We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Stacks
- AND xor OR
- Discussions
AND xor OR
AND xor OR
Sort by
recency
|
153 Discussions
|
Please Login in order to post a comment
O(n), 3 pass over the array A. there are only linearly many pairs (M1, M2)
andXorOr(a.size(),a)
in main function where this function is being called, you have to pass 2 arguments one is length of that vector and the vector itself
How is it that 9 and 6 are the smallest and the next smallest numbers in the given array? I struggle to understand this part of the assignment ` Let M0 and M1 be the smallest and the next smallest element in the interval. What defines L and M in this case? Is it just the 0 and 1 values in the whole array?
when we take array[0],array[1] ie., [9,6] we get maximum value for the given condition
great logic
My JS Solution
My Python Solution