Leetcode-Solutions icon indicating copy to clipboard operation
Leetcode-Solutions copied to clipboard

Update Binary Tree Level Order Traversal (BFS) - Leetcode 102.py

Open venchand opened this issue 1 year ago • 0 comments

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:

Screenshot 2024-06-03 at 1 07 40 PM

venchand avatar Jun 03 '24 07:06 venchand