Skip to content

Linked-List-2 Done#1418

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

Linked-List-2 Done#1418
Sreeja-99 wants to merge 4 commits intosuper30admin:masterfrom
Sreeja-99:master

Conversation

@Sreeja-99
Copy link
Copy Markdown

No description provided.

Implement the deleteNode method to remove a node from a linked list without access to the previous node.
Implement two methods to find the intersection of two singly-linked lists. The first method uses a set to track nodes from the first list, while the second method compares lengths and synchronizes traversal.
@super30admin
Copy link
Copy Markdown
Owner

  • Strengths: The solution correctly implements the BST Iterator functionality and follows the expected approach using a stack for in-order traversal. The code is readable and well-structured.
  • Areas for Improvement:
    • Replace the recursive dfs method with an iterative one to avoid potential stack overflow and improve efficiency.
    • Ensure that the next() method handles edge cases gracefully, such as when the stack is empty (though the problem states next() calls will always be valid).
    • Consider adding comments to explain the logic more clearly, especially for the dfs method.

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