Laserfiche Interview Question

Your task is to implement a findMatches function that takes a query value and a pre-sorted array of integers that may contain duplicates. It should find and return  The index of the first instance of the query value in the array, or -1 if the query value does not exist in the array.  The number of times the query value appears in the array (0 if the query value does not exist in the array).

Interview Answer

Anonymous

Mar 7, 2017

Pretty easy to do in C/C++

1