Skip to content

Conversation

@dharma6
Copy link

@dharma6 dharma6 commented Jan 3, 2026

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The student has implemented both data structures correctly and efficiently.
  • The code is clean, readable, and follows best practices.
  • The use of helper methods (primary_hash, secondary_hash) in MyHashMap is a good practice.

Areas for Improvement:

  • In MyQueue, the empty() method could be simplified to return not self.in_stack and not self.out_stack for better readability and conciseness.
  • In MyHashMap, the put() method could be optimized to avoid redundant calculations of secondary_hash(key) by storing it in a variable.
  • The student could add docstrings to explain the purpose of each method, especially for MyHashMap, to improve code documentation.

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