Editorial illustration of a magnifying lens scanning clay tiles beside an open notebook.

Example result illustrating this prompt's visual direction. Actual results may vary by model, reference image and settings.

Linear Search Scan from Handwritten Notes

Turn a photographed linear-search example into an indexed scan with an explicit stopping point.

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 input order. Show the current index, target comparison and visited prefix in each panel; stop on the first match, or show exhaustion for a missing target. Use zero-based indexing unless the notes say otherwise. If no example is supplied, visibly mark this as an illustrative example: [8, 3, 6, 2], target 6; comparisons occur at indices 0, 1 and 2, returning 2. Never imply that the whole array was sorted. State worst-case time O(n) and auxiliary space O(1). Layout: A left-to-right strip of four roomy panels, with amber for the active cell, pale gray for checked cells and teal for the match. 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.
Recommended: ChatGPT
Upload your photo to the AI tool first, then use this prompt. The prompt asks the model to preserve identity and key visual features.

How to use it

  1. Upload a clear photo of the relevant handwritten algorithm notes.
  2. Paste this prompt and specify any required input or indexing convention.
  3. Check the rendered values and labels against your source before publishing.

Common failure fixes

  • If the scan skips a cell, restore consecutive index checks from the first element.
  • If duplicate matches appear, stop at the first match for this specified algorithm.
  • If values move, restore the original array order and change only the highlight.