dunnhumby interview question

BST, linked list, recursion time complexity