How can I find a local minimum in a 2D array using binary se
How can I find a local minimum in a 2D array using binary search in Java?
Solution
Firstly sort each row in the 2D array using a simple sort technique as it is a prerequisite for performing binary search.
Now using a siuble for loop access each row of the matrix
For each row apply the binary search algorithm ,recursively calculate mid and compare to get local minima
Or alternatively access the first element of each row which is the least value or local minima of that row
