Slug: list-index-01 · Paired reading: Chapters 18 and 21
Prompt
Given a singly linked list as Option<Box<Node>> with val / next,
convert it into a flat arena: Vec<i32> values plus Vec<Option<usize>>
next-links (same length). Return (values, nexts) with head at index 0
when non-empty. Empty input → two empty vecs.