Skip to content

Conversation

rajyalakshmimannem
Copy link

Implement HashMap and create queue using 2 stacks

@super30admin
Copy link
Owner

Strengths:

  • Good understanding of data structures and their implementations.
  • Generally correct time and space complexities.
  • Clean and readable code structure.

Areas for Improvement:

  • In DesignHashMap, ensure the Node class has a next field and is properly nested. Currently, it's causing compilation issues.
  • The peek() method in CreateQueueUsingStacks should return the peeked value (add return outStack.peek();).
  • Consider adding comments to explain the logic, especially for complex operations like the hash map's chaining.
  • The MinStackUsing2Stacks class name has a typo (MinStackUsing2stacks in the constructor vs. MinStackUsing2Stacks in the class name).

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