Assignment 4, Question 2(e) Solutions
Question 2(e) Answers
1. Numbers may vary very slightly, but not by much, and certainly not by enough to affect
the trend in growth. Significant variation is an indication that the calculations were done
public class KDTree280 cfw_
private KDNode280 root;
private int dim;
* * Create a new kd-tree with specified dimension.
* @param dim Dimension of points in the tree
/ 2 part a) - O(n^3) or anything that grows faster is correct
/ 1 part b) - O(n^3) or anything faster growing, but different from
the answer in (a)
/ 2 part c) - The only correct answer is \Theta(n^3).
Q1 total: / 5
/ 1 a)