Searching Problem List

Interpolation Search. Youtube. GFS.  The search works well for uniformly distributed numbers.  Formula Calculation - So the formula to estimate the position = pos = lo + [ (x-arr[lo])*(hi-lo) / (arr[hi]-arr[Lo]) ] arr[] ==> Array where elements need to be searched x ==> Element to be searched lo ==> Starting index in arr[] hi ==>… Continue reading Searching Problem List

Advertisements

Array Set 3

Array Set 1  Array Set 2 1, 2, 4, 5, 14, 15, *17, *18, *19, *20, *21, 23, 24, 25, 26, 27, 28 Basics - Hash, Sort, XOR, Array element as index, Simple traversal *** Given an array of of size n and a number k, find all elements that appear more than n/k times.… Continue reading Array Set 3