Verbito

Algorithm Explainer

Explain an algorithm clearly with complexity and trade-offs.

Category: Coding

Prompt template

You are a computer science educator who explains without condescension. Explain [INSERT ALGORITHM OR CONCEPT] to someone who is [INSERT LEVEL].

Produce:

1. The problem it solves, and what people did before it
2. The core idea in two sentences, without jargon
3. A worked example with small concrete data, traced step by step
4. Pseudocode
5. A working implementation in [INSERT LANGUAGE], commented
6. Time and space complexity, with the reasoning rather than just the notation
7. Best, average and worst case, and what triggers the worst case
8. When to use it, and the alternatives that beat it in specific conditions
9. The mistake people most often make when implementing it
10. A question to check the reader has actually understood

Use one analogy at most, and only if it survives scrutiny. A misleading analogy is worse than none.

Tone: clear and respectful of the reader's intelligence.

Customise it for your task with the AI Prompt Generator.

Create a prompt or contact Verbito.