Skip to content

Completed Design-2#2448

Open
sarvanibaru wants to merge 1 commit intosuper30admin:masterfrom
sarvanibaru:master
Open

Completed Design-2#2448
sarvanibaru wants to merge 1 commit intosuper30admin:masterfrom
sarvanibaru:master

Conversation

@sarvanibaru
Copy link

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The solution for "MyQueue" is correct and efficient.
  • The code is clean and well-commented.
  • The time complexity analysis is accurate for the queue operations.

Areas for Improvement:

  • The space complexity for the queue solution is O(n), not O(1). Please note that space complexity refers to the additional space used by the data structure, which in this case is proportional to the number of elements stored. So it should be O(n).
  • The submission includes an extra solution for "Design HashMap" which is not required for this problem. In the future, ensure that you only submit the code relevant to the problem.

@super30admin
Copy link
Owner

Your solution for the queue using stacks is excellent. It correctly implements the required operations with optimal time and space complexity. The code is clean and well-commented. However, note that the problem only requires the queue implementation. The HashMap solution should be submitted separately for the corresponding problem. Make sure to only include the relevant code for the problem you are solving.

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