(Algorithms1, week5) Partial implementation of KdTree