Given the root of a tree, determine if it is a binary search tree (BST).
Considered multiple approaches to this solution, looking at the impact of recursion over iteration. Talked through the approaches with JB for understanding, went through the whiteboarded exercise and used chatgpt as a resource on the code and Big O.
- JB and his demo Class 36
- ChatGPT
Time Complexity: O(n) b/c each element in the input list will be visited
Space Complexity: O(h) with h representing the height of the tree
