Skip to content

Conversation

@praxpk
Copy link

@praxpk praxpk commented Dec 25, 2025

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The student has correctly implemented both data structures with the required time and space complexity.
  • The code is well-commented and easy to understand.
  • The student has handled edge cases appropriately, such as checking for empty stacks in the queue and handling null values in the hashmap.

Areas for Improvement:

  • In the queue's peek method, the logic can be simplified by reusing the pop method's approach (transferring elements from in_stack to out_stack when out_stack is empty). This would make the code more concise and maintainable.
  • The hashmap implementation could benefit from a more detailed explanation of the double hashing technique used, especially why the secondary array size is 1001 for main_index 0.
  • The student should ensure consistency in variable naming (e.g., inSt vs. in_stack) to follow a single naming convention.

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