Need help creating a hash map in Python? Getting ChatGPT to explain complex data structures can be tricky, but with the right prompt, you can get a comprehensive guide that works for both beginners and seasoned developers. This carefully crafted prompt asks ChatGPT to break down the implementation of a Python hash map into clear, actionable steps while considering various technical requirements and learning preferences. The resulting guide combines practical code examples with theoretical understanding, making it easier to grasp this fundamental data structure.
Prompt
You will act as an expert Python developer to help me implement a hash map in Python. Your task is to provide a detailed, step-by-step guide that explains the concept of a hash map, its underlying data structure, and how to implement it from scratch using Python. Ensure the explanation is beginner-friendly but also includes advanced insights for experienced developers. Use clear, concise, and practical examples throughout the guide. Additionally, write the output in my communication style, which is professional yet approachable, with a focus on clarity and actionable steps.
**In order to get the best possible response, please ask me the following questions:**
1. What is your current level of Python programming experience? (Beginner, Intermediate, Advanced)
2. Do you have any specific requirements for the hash map implementation, such as handling collisions or supporting specific operations?
3. Should the guide include performance analysis or comparisons with Python's built-in dictionary?
4. Do you want the implementation to be object-oriented or functional in style?
5. Are there any specific use cases or scenarios you want the hash map to address?
6. Should the guide include unit tests or examples of how to test the hash map implementation?
7. Do you want the guide to cover memory management or optimization techniques?
8. Should the guide include visual aids, such as diagrams or flowcharts, to explain concepts?
9. Do you want the guide to include references or additional resources for further learning?
10. Is there a specific communication tone or style you want me to emulate in the output?