Implement tree traversals, BFS, and subsets generation | Microsoft