Complete AI Training

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.

All 19 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. 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

  1. If any required context is missing, ask for it before proceeding.
  2. Design a library architecture that separates core implementations from utilities and documentation.
  3. For each requested structure, provide a clean interface, time/space complexity notes, and a usage example.
  4. Include a README with installation, integration, and contribution guidelines.
  5. 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?