title: How to implement range search in KD-Tree
body: <p>I have built a <code>d</code> dimensional KD-Tree. I want to do range search on this tree. <a href="https://en.wikipedia.org/wiki/K-d_tree#Range_search" rel="noreferrer">Wikipedia</a> mentions range search in KD-Trees, but doesn't talk about implementation/algorithm in any way. Can someone please help me with this? If not for any arbitrary <code>d</code>, any help for at least for <code>d = 2</code> and <code>d = 3</code> would be great. Thanks!</p>