Leetcode-Solutions
Leetcode-Solutions copied to clipboard
Update Binary Tree Level Order Traversal (BFS) - Leetcode 102.py
Note to @gahogg : Thanks a lot for being an inspiration. Your approach to problems are very unique and you have a clean thought process.
We can avoid the internal for loop by appending None after completion of each level. This has better run time complexity
Leetcode runtime: