Skip to content

BFS-2 Done#1573

Open
Sreeja-99 wants to merge 2 commits intosuper30admin:masterfrom
Sreeja-99:master
Open

BFS-2 Done#1573
Sreeja-99 wants to merge 2 commits intosuper30admin:masterfrom
Sreeja-99:master

Conversation

@Sreeja-99
Copy link
Copy Markdown

No description provided.

Implement isCousins method using BFS and DFS approaches.
Implemented two methods to get the right side view of a binary tree using BFS and DFS approaches.
@super30admin
Copy link
Copy Markdown
Owner

The student's solution is excellent. The inclusion of both BFS and DFS approaches demonstrates a deep understanding of the problem and different traversal techniques. The comments and explanations provided are clear and helpful. One minor suggestion would be to ensure consistency in method naming (e.g., helper could be more descriptive, such as dfsTraversal). Additionally, the DFS approach could be slightly optimized by returning early if both xlevel and ylevel are found and their levels are not equal, but this is a minor point.

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