Searching Algorithms
![]() |
| Searching: The movie |
- Applied Mathematics
- Find the missing and the repeating number from a given array of numbers from 1 to n.
- Binary Search
- Median of two sorted arrays of the same/different size.
- Count number of occurrences (or frequency) in a sorted array.
- Min/Max Heap
- Kth smallest element in a row-wise and column-wise sorted 2D array
- Pre-Sorting
- This method is used to generate a sorted array on which a binary search is applied.
So my suggestion would be, whenever it says to find an element you should first think of the brute force method but the next step should be to think w.r.t. the above-mentioned algorithms and programming paradigm.
Practice problems:
2,4,8,10,15,23,25,46 from https://www.geeksforgeeks.org/searching-algorithms/

Comments
Post a Comment