i didn’t understood the binary search approach told in the video can you please explain me in detail
Binary Search Approach
see the median is the middle value in the array is array is in increasing order
it is a little unclear that sir has first merged the 2 arrays together or no:
but lets assume that they are merged in increasing order which has ( 2* n ) elements
then we apply binary search on the resultant array
we simply keep a count of elements to the left
since median is middle most element so if count == n ( that is we are at the middle) we return that particular element
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.