Skip to content

solved#1426

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

solved#1426
jeetusingh247 wants to merge 1 commit intosuper30admin:masterfrom
jeetusingh247:master

Conversation

@jeetusingh247
Copy link
Copy Markdown

No description provided.

@super30admin
Copy link
Copy Markdown
Owner

Your solution for BSTIterator is excellent. It correctly implements the iterator with the required time and space complexity. The code is clean and easy to understand. However, note that the problem only asks for the BSTIterator implementation. Including solutions for other problems in the same file might be confusing and is not necessary. In the future, ensure that you only submit the code relevant to the problem at hand.

One minor suggestion: the dfs method could be renamed to something more descriptive, like pushAllLeft, to make it clear that it pushes all left children onto the stack. This is a common naming convention in such solutions.

Overall, great job on the BSTIterator implementation.

@super30admin
Copy link
Copy Markdown
Owner

No specific feedback provided. Refer to GitHub Comment.

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