Conceptual paper sculpture of strands separating and recombining above an open notebook.

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

Merge Sort Split and Combine from Recursion Notes

Turn divide-and-conquer notes into a split tree and a separate ordered merge sequence.

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". Separate recursive splitting from merging; splitting does not sort a subarray. Preserve left-to-right input order in the leaves and compare the heads of two sorted runs during each merge. Optional labeled example: [7, 2, 6, 3] splits into [7, 2] and [6, 3], then singleton leaves; merge pairs to [2, 7] and [3, 6], then [2, 3, 6, 7]. Choose the left value on ties for stability. State O(n log n) time and O(n) auxiliary array space for this conventional array implementation. Layout: Use an upper split section and lower merge section with clear direction labels; distinguish the two phases with blue and teal. 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 split panels appear sorted, restore their original order until the merge phase.
  • If a merge skips a smaller head, redo comparisons using the first remaining element of each run.
  • If duplicate values vanish, count and retain every occurrence through all levels.