title: find lowest index of a given value in a presorted array
body: <p>Hey I had this question in an interview and was wondering what was the best way to solve it. So say you are given an array that is already sorted and you want to find the lowest index of some value x.</p>
  
  <p>Here is a python/pseudocode of what I came up with, I am just wondering if there is a better way to go about it?</p>
  
  <pre><code>def findLowestIndex(arr, x):
       index = binarySearch(0, len(arr), x)
       if index != -1:
           while index &gt; 0:
             if arr[index] == arr[index-1]:
                index -= 1
             else:
                break
       return index
  </code></pre>
  
  <p>Thanks!</p>