diff --git a/docs/autopilot.md b/docs/autopilot.md index e88b32c..14b8eb9 100644 --- a/docs/autopilot.md +++ b/docs/autopilot.md @@ -92,6 +92,7 @@ Nothing. The exam-stack block (since 2026-11-06, over #68's inline practice ques Newest first. One line per run: date and run, what was done, PR link, merged or open. +- 2026-11-20 14:50 (run C): from the 2026-11-12 audit, the Data Structures union-find forest (110 px too wide at 390 px in its starting state of 8 singletons) now fits: single-node sets take a smaller gap, the minimum width applies from sm up, node labels are larger on phones (at least 15 px, nodes at least 24 px wide to tap), and the forest is centred. PR #110, open. - 2026-11-17 14:50 (run C): from the 2026-11-12 audit, the Computer Organization `bits-and-bytes` unit ladder (124 px too wide at 390 px) now fits. Its captions now sit under their bars in a two-column grid at every width, which also fixes the desktop TB and PB captions wrapping unindented, and "2^0 = 1 bytes" now reads "1 byte". PR #99, open. Its CI check is red only because main is: The Exam Mind's round 7 (#97) renamed a heading that a bank question points at; fixed in PR #100. - 2026-11-17 10:40 (run B): exam phase 4c, Computer Organization: +26 questions over all 9 taught lessons, numbers checked by script (500 GB shown as 465.7, G = 01000111, 2¹⁶ and 2¹² locations, the disk capacity 516,096,000 bytes, 4.2 ms average wait at 7,200 rpm). PR #96, open, stacked on #94. - 2026-11-17 06:10 (run A): exam phase 4c, Microprocessors: +34 questions over all 11 taught lessons, every value checked by script (C8h + 64h flags, CS:IP and segment limits, effective address, MUL/DIV results, XOR case flip, LOOP sum, SP after push/pop, INT 21h vector at 84h). PR #94, open, stacked on #91. diff --git a/src/components/mdx/DataStructureVisualizers.tsx b/src/components/mdx/DataStructureVisualizers.tsx index b979b4b..5e8cefc 100644 --- a/src/components/mdx/DataStructureVisualizers.tsx +++ b/src/components/mdx/DataStructureVisualizers.tsx @@ -565,13 +565,16 @@ export function UnionFindLab() { placed.push({ v, x, y: d, parent }); return x; }; + // a set of one needs less room than a tree, so the eight starting singletons fit a phone + let lastGap = 0.4; roots.forEach((r) => { lay(r, 0, null); - col += 0.4; + lastGap = kids(r).length ? 0.4 : 0.15; + col += lastGap; }); const maxD = Math.max(...placed.map((p) => p.y)); const W = Math.max(300, col * 44 + 20); - const X = (x: number) => 26 + (x / Math.max(1, col - 0.4)) * (W - 52); + const X = (x: number) => 26 + (x / Math.max(1, col - lastGap - 1)) * (W - 52); const Y = (y: number) => 24 + y * 54; const pos = new Map(placed.map((p) => [p.v, p])); return ( @@ -582,7 +585,7 @@ export function UnionFindLab() {
- + {placed.map((p) => { if (p.parent === null) return null; const q = pos.get(p.parent)!; @@ -592,7 +595,7 @@ export function UnionFindLab() { click(p.v)}> - {p.v} + {p.v} ))}