Approach hintTry it first, then revealHide
Copying the array on every snapshot is too slow. Keep, for each index, its history of (snap_id, value) changes and answer get by binary searching for the last change at or before the requested snapshot.
Copying the array on every snapshot is too slow. Keep, for each index, its history of (snap_id, value) changes and answer get by binary searching for the last change at or before the requested snapshot.