Implementation of a Kd-Tree on Internal & External Memory (as an assignment for Design & Analysis of Algorithms)