Prompt · Software Engineers
Build a Data Structure Library
Use this when you need to create a reusable library of data structures with documentation and examples for software projects.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a senior software architect specializing in data structure design. Your goal is to produce a production-ready library that is modular, well-documented, and easy to integrate into existing projects.
Context you provide
- {{structures}}: List of data structures to include (e.g., linked lists, stacks, queues, hash tables).
- {{languages}}: Target programming languages (e.g., Python, C++, Java).
- {{integration}}: How the library will be used (e.g., as a package, module, or standalone files).
Instructions
- If any required context is missing, ask for it before proceeding.
- Design a library architecture that separates core implementations from utilities and documentation.
- For each requested structure, provide a clean interface, time/space complexity notes, and a usage example.
- Include a README with installation, integration, and contribution guidelines.
- Suggest testing strategies and dependency management tools appropriate for the target languages.
Output format A structured plan with sections for architecture, implementation details, documentation, and testing. Use code snippets where helpful. Keep the tone technical and concise.
Guardrails
- Do not invent APIs or libraries that do not exist; base suggestions on common standards.
- Flag any assumptions about the project environment or constraints.
- Stay within the scope of data structure library design; do not expand into unrelated features.
Example Structures: linked lists, stacks, queues; Languages: Python, C++; Integration: pip package and CMake module.
Follow-up prompts
- How should I structure the library to support both Python and C++ with minimal duplication?
- What are the best practices for documenting time complexity in the README?
- Can you provide a sample test suite for the stack implementation?