Skip to content

Conversation

@thondaha
Copy link

Completed HomeWork 1 and 2

@super30admin
Copy link
Owner

Strengths:

  • The implementations are correct and handle edge cases well.
  • The code is clean, well-commented, and follows good practices.
  • The use of separate chaining in MyHashSet and the minSoFar approach in MinStack are well thought out.

Areas for Improvement:

  • Consider using a prime number for the bucket size in MyHashSet to potentially reduce collisions.
  • The MinStack implementation could include null checks in pop(), top(), and getMin() to handle cases where the stack is empty, though the problem constraints might not require it.
  • Adding more test cases in the main method to cover edge cases would be beneficial.

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