title: Efficient implementation of the Nearest Neighbour Search
body: <p>I am trying to implement an efficient algorithm for <em>nearest-neighbour search</em> problem. </p>
  
  <p>I have read tutorials about some  data structures, which support operations for this kind of problems (for example, <em>R-tree</em>, <em>cover tree</em>, etc.), but all of them are difficult to implement. </p>
  
  <p>Also I cannot find sample source code for these data structures. I know C++ and I am trying to solve this problem in this language. </p>
  
  <p>Ideally, I need links that describe how to implement these data structures using source code.</p>