Implement Queue with Stacks#2460
Conversation
Create Queue using Stacks (ImplementQueueWithStacks.py)Strengths:
Areas for improvement:
Overall, the solution is correct and efficient. With minor improvements in code style, it would be excellent. VERDICT: PASS Implement Hash MapIt seems there might have been a mix-up in the problem you were solving. The problem was to implement a HashMap, but you provided a solution for implementing a queue using stacks. Please review the problem statement again: you need to design a HashMap class with methods For the HashMap implementation, you should consider using an array of linked lists (or another method) to handle collisions. The reference solution provided uses a hash function to index into an array and handles collisions with linked lists. Each bucket in the array points to a linked list of nodes that store key-value pairs. Key points for the HashMap:
Please try to implement the correct solution. If you have questions about the HashMap implementation, feel free to ask. VERDICT: NEEDS_IMPROVEMENT |
No description provided.