Example result illustrating this prompt's visual direction. Actual results may vary by model, reference image and settings.
Breadth-First Search Queue Trace from Graph Notes
Convert a graph sketch into a level-by-level traversal with synchronized queue states.
Prompt
Transform the uploaded photo of handwritten algorithm notes into a clean, readable visual walkthrough. Treat the photo as the source of truth: preserve its algorithm, legible input values and stated conventions; remove glare, skew and paper clutter while retaining a small source-note inset. Do not invent unreadable values or silently repair contradictory logic; ask one focused question if an essential detail cannot be read. Use the optional example below only when the source has no worked example and label it "Illustrative example". Preserve the graph vertices, edges and edge direction. State the start vertex and neighbor order. Mark vertices discovered when enqueued so a vertex enters the queue at most once. Pair each processed vertex with the queue after its neighbors are examined. Optional labeled undirected example: edges A-B, A-C, B-D, C-E; start A and alphabetical neighbor order; dequeue order A, B, C, D, E; queues after processing are [B,C], [C,D], [D,E], [E], []. Explain that BFS finds shortest edge-count paths in an unweighted graph. State O(V+E) time with adjacency lists and O(V) auxiliary space. Layout: Place the graph on the left and a vertical queue timeline on the right; use rings for distance layers and both labels and colors for state. Use an off-white canvas, dark high-contrast sans-serif labels and spacious cells. Include the algorithm title, input, numbered steps, final result and the stated complexity note. Pair colors with labels or outlines so meaning does not depend on color alone. Keep all values and state changes consistent across panels. If space is tight, simplify decoration rather than omitting essential steps. Output one polished educational image; treat it as a visual explanation, not executable code. Before finalizing, check the trace and all visible labels against the source.
How to use it
- Upload a clear photo of the relevant handwritten algorithm notes.
- Paste this prompt and specify any required input or indexing convention.
- Check the rendered values and labels against your source before publishing.
Common failure fixes
- If a vertex enters the queue twice, mark it discovered at enqueue time.
- If traversal order changes between panels, enforce the stated neighbor order.
- If a weighted shortest-path claim appears, restrict the explanation to unweighted edge-count distance.