Explain a algorithm / data structure

Understand how and when to use it.

chatgptclaude
Act as a CS teacher. Explain [algorithm/data structure] clearly: what it is, how it works (with a step-by-step example), its time/space complexity, when to use it and when not to, and a minimal implementation in [language]. Add one common interview question about it.

How to use this prompt

  1. Tap Copy prompt above.
  2. Replace the [bracketed] parts with your own details.
  3. Paste it into chatgpt, claude.