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
Given a sorted array and an element X, check if the element is repeated.
2.
Given a sorted array where every element is present twice except one element. Find the single occurring element. (Element is not given.)
3.
Given an array of length n, where elements are sorted, all the elements are unique but one element is present twice, and the elements lie in the range [0, n-2]. Find the repeating element.
Home Work
What if instead of dividing the array into two parts, we start dividing the array into 3 parts. As (log3n < log2n) ?
11 Doubt Solving
July, 17
Notes
XOR N Queens Subsequence Vs Subset
1.
Given a sorted rotated array, find the min element in less than O(n).
12 Revision: Problem Solving Binary Search
July, 18
Notes
1.
Find three unique set(s) having an equal sum.
2.
In an array find a pair with a given sum
3.
Total Triplets
Home Work
H/W gave on Jul 15:
Do you think it’s a good idea to divide your search space into 3 parts (Ternary Search)?
Dividing it into 2 parts makes sense because it gives you less number of comparisons, but, How many comparisons?
If we divide merge sort into 3 subarrays instead of 2, How many comparisons will increase? Calculate the factor by which it will increase.