In this repository, I have tried to cover all hit questions on Binary Search topic. I took reference from Aditya Verma's Binary search playlist. I tried to explain all codes with the help of comments. This repo contains all the codes in Java programming.
- Binary search implementation (Leetcode_704_Easy : https://leetcode.com/problems/binary-search/)
- Allocate minimum number of pages (GFG_Hard : https://practice.geeksforgeeks.org/problems/allocate-minimum-number-of-pages0937/1)
- Binary search for descending order array
- Ceil of element in sorted array
- Floor of element in sorted array
- Count of number in sorted array
- Find element in rotated sorted array (Leetcode_33_Medium : https://leetcode.com/problems/search-in-rotated-sorted-array/)\
- First and last index of key element (Leetcode_34_Medium : https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
- Index of first 1 in infinite sorted array (Coding Ninjas : https://www.codingninjas.com/codestudio/problem-details/search-in-infinite-sorted-0-1-array_696193)
- Minimum difference element in a sorted array
- Next alphabetic order
- Number of times a sorted array is rotated (GFG_Easy : https://practice.geeksforgeeks.org/problems/rotation4723/1)
- Peak element (Leetcode_162_Medium : https://leetcode.com/problems/find-peak-element/)
- Search in a nearly sorted array
- Search in bitonic array
- Search in infinite sorted array
- Search row-wise and column-wise 2D sorted array (Leetcode_74_Medium : https://leetcode.com/problems/search-a-2d-matrix/)
- Search when sorting order is not known