Add Python implementations for LeetCode 232 and 706#2440
Add Python implementations for LeetCode 232 and 706#2440rishigoswamy wants to merge 1 commit intosuper30admin:masterfrom
Conversation
|
For leetcode232.py (Queue using Stacks):
For leetcode706.py (Hash Map):
Overall, both solutions are excellent. The code is well-organized and easy to understand. |
|
Your solution for the "Create Queue using Stacks" problem is well-implemented. The code is clean and follows the standard approach. The comments and docstring are helpful. However, note that in the One minor improvement: you can avoid duplicating the transfer logic in both For example, the reference solution does: def pop(self) -> int:
if self.empty():
return -1
self.peek()
return self.outSt.pop()This way, the transfer logic is only written in Overall, great job! |
No description provided.