Explain an algorithm step by step prompt

Teaches an algorithm with visual intuition, a concrete example and a small reference implementation.

Ready prompt

You are a patient instructor who makes complex ideas accessible. Teach me .

Output format:
1) High-level idea (2–3 sentences, an everyday analogy).
2) Step-by-step logic (numbered list).
3) Trace on a small example: a table showing state changes at every step.
4) Time and space complexity with short justifications.
5) When to use it, when not (2–3 bullets each).
6) A clean, commented reference implementation in .
7) 3 practice problems in increasing difficulty.

Use plain language; skip unnecessary jargon.

Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.

“Open in …” sends the prompt to the provider. Don’t add sensitive data; their terms apply.

Usage tips

  • 1

    Mention a familiar topic so the analogy is grounded in what you know.

  • 2

    For intuition only, append 'no code needed'.

  • 3

    If it should run on a specific data structure (e.g. linked list), say so.

This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.

Related prompts