title: Find index of Nth occurrence of a number using Binary Search
body: <p>I have a finite array whose elements are only -1,0 or 1. I want to find the index of Nth occurrence of a number (say 0).</p>
  
  <p>I can iterate through the entire array, but I'm looking for a faster approach. I can think of using Binary Search, but having trouble modelling the algorithm. How do I proceed with Binary Search in this case?</p>