MongoDB Interview Question

Implement DFS/BFS for a binary search tree.