Skip to content

Conversation

@jose-rafael-marcano
Copy link

Adding two problems:

1- https://leetcode.com/problems/design-hashset
Class MyHashSet.java

2- https://leetcode.com/problems/min-stack/
Class MinStack.java

@super30admin
Copy link
Owner

Strengths:

  • The student has correctly implemented both data structures with optimal time and space complexity.
  • The code is clean, well-organized, and includes helpful comments.
  • The use of lazy initialization for the inner arrays in MyHashSet is a good optimization.

Areas for Improvement:

  • The comment in MyHashSet explaining the use of division for the second hash function is very detailed, but it could be slightly more concise while still being clear.
  • The MinStack implementation could benefit from a brief comment explaining the logic behind pushing the old minimum when a new minimum is encountered.

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