Skip to content

Done Linked-List-2#1417

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

Done Linked-List-2#1417
vaishnavi2231 wants to merge 1 commit intosuper30admin:masterfrom
vaishnavi2231:master

Conversation

@vaishnavi2231
Copy link
Copy Markdown

No description provided.

@super30admin
Copy link
Copy Markdown
Owner

  • The BSTIterator solution is well-implemented and follows the correct approach. The use of a stack to manage the in-order traversal is efficient and correctly handles the tree structure.
  • The dfs function could be renamed to something more descriptive, like pushLeftNodes, to better reflect its purpose.
  • The hasNext() method could be simplified to just return bool(self.stack) instead of using a ternary operator, which would be more Pythonic.
  • The other files (linked-list-cycle-ii.py and reorder-list.py) are not relevant to the BST Iterator problem and should not be included in the evaluation of this specific 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