Pigeonhole Sort

Pigeonhole sorting is a sorting algorithm that is suitable for sorting lists of elements where the number of elements and the number of possible key values are approximately the same.It requires O(n + Range) time where n is number of elements in input array and ‘Range’ is number of possible values in array. ALGORITHM: 1.Find … Continue reading Pigeonhole Sort

Searching and Sorting Algorithms

Searching Algorithms : Linear SearchBinary SearchJump SearchInterpolation SearchExponential SearchSublist Search (Search a linked list in another list)Fibonacci SearchThe Ubiquitous Binary SearchRecursive program to linearly search an element in a given arrayRecursive function to do substring searchUnbounded Binary Search Example (Find the point where a monotonically increasing function becomes positive first time) Sorting Algorithms: Selection SortBubble … Continue reading Searching and Sorting Algorithms