JAVA Program Count 1’s in a sorted binary array – Searching and Sorting – A simple solution is to linearly traverse the array. The time complexity of the simple solution is O(n). We can use Binary Search to find count in O(Logn) time.
java bubble sort
2 Articles
2
Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted -Searching and sorting – Given an unsorted array arr[] of size n. find the minimum length subarray arr[s..e]