Skip to content

Conversation

@SaiSaranPathuriNEU
Copy link

No description provided.

@SaiSaranPathuriNEU
Copy link
Author

Please kindly observe that code comments(approach explaination) are baked in the code itself

@SaiSaranPathuriNEU
Copy link
Author

Also the naming convention is not upto the mark, next assignment i'll make sure i'll be bit more clear. I was timing how much time i take to solve these, so focused on explaination as comments and speed. I'll improve the naming for next assignements. Thank you!

@super30admin
Copy link
Owner

Strengths:

  • The code is well-commented and easy to understand.
  • The student has correctly implemented the required functionalities for both problems.
  • The use of separate hash functions and initialization in the constructor shows good practice.

Areas for Improvement:

  • For the min-stack, consider optimizing the space usage by only pushing to the min stack when a new minimum is found, rather than pushing the current minimum every time. This would reduce the space usage in some cases.
  • The comment in the hashset solution about "dinamically allocate" should be corrected to "dynamically allocate."
  • The space complexity comment in the hashset solution could be more precise, mentioning that it's O(n) in the worst case but typically much less due to the hashing.

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