Hacker News new | ask | show | jobs
by jeena 3653 days ago
How would you learn how to implement that algorythm if you'd just use an existing implementation?
2 comments

Read the wiki page on it, run through the psuedocode on pen and paper a few times and then implement it.

Source: I did this when I wrote a library for reverse geocoding which uses a kd tree.

https://github.com/AReallyGoodName/OfflineReverseGeocode

Implementing a spatial tree is not the same as implementing Nearest neighbours. It's just a data structure to allow efficient culling.