You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,7 @@ max edge or path to be traversed to minimize work.
133
133
used where if an element should be repeating a given number of times, you can check its value at i and then
134
134
i+given number of times to see if thats true or not.
135
135
- In divide and conquer even number of multiplications can be reduced from n to logn to get the same result. Example is the pow function where the base value is square everytime and power is halved everytime to get the same answer in logn multiplications. In case the power value is odd, the result is given the base value such that power value is converted to even and then same operations are applied.
136
+
- In binary search whatever the algo be, always start from the middle and compare values to the left or right. You may even compare the extreme left and the right values to see lower and upper bound or some pattern to solve the algo. But in binary search always start from the middle.
136
137
137
138
# Topic0: Programming Questions
138
139
@@ -318,6 +319,7 @@ i+given number of times to see if thats true or not.
318
319
-[Find a majority element using linear search that occurs more than n/2 times](/divide-and-conquer/question1.c)
319
320
-[Nuts and bolts problem](/divide-and-conquer/question2.c)
320
321
-[Write a custom C function to implement a pow function](/divide-and-conquer/question3.c)
322
+
-[Select an element in sorted rotated array](/divide-and-conquer/question4.c)
0 commit comments