Write a function that returns true if a given binary tree is a valid binary search tree (i.e. if all of root's left nodes are less than root.value, all of root's right nodes are greater than root.value, and both left and right subtrees are also valid binary search trees).
2.2 KiB
2.2 KiB
- Array and string manipulation
- Hashing and hash tables
- Greedy Algorithms
- Sorting, searching, and logarithms
- Trees and graphs
- Dynamic programming and recursion
- Queues and stacks
- Linked lists
- System design
- General programming
- Bit manipulation
- Combinatorics, probability, and other math
- JavaScript
- Coding interview tips