Skip to content

BFS-1#1626

Open
shinjaneegupta wants to merge 1 commit intosuper30admin:masterfrom
shinjaneegupta:master
Open

BFS-1#1626
shinjaneegupta wants to merge 1 commit intosuper30admin:masterfrom
shinjaneegupta:master

Conversation

@shinjaneegupta
Copy link
Copy Markdown

No description provided.

@super30admin
Copy link
Copy Markdown
Owner

Your solution for Level Order Traversal is excellent. It correctly uses a BFS approach with a queue to process each level of the tree. The use of deque from collections is efficient for queue operations. The code is clean and well-commented.

However, note that you included code for a different problem (CourseSchedule) in the same file. When submitting solutions, ensure that you only provide the code for the problem you are solving. This helps avoid confusion and ensures that the evaluator focuses on the correct solution.

For the Level Order solution, one minor improvement: you can avoid the inner loop variable i since it's not used. You can replace it with _ to indicate it's a throwaway variable, but this is a small stylistic point.

Overall, great job on the Level Order solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants