kdtree is supposed to be fixed - but got runtime error on judge
instead of insisting - will try the book solution instead, it is way simpler - the kd-tree exercise is over.