Following a record through several edits

An inspection application stores the ten record identifiers shown below in a zero-based list backed by a contiguous array of capacity sixteen. Execute remove(2), insert(6, 245), set(3, 259), and remove(8) in that order. Insertion places a new entry before the current entry at its index; replacement changes only the value. Each removal closes its gap, and no resizing occurs.


Find the final size, the final index of identifier 202, and the total number of one-slot shifts of existing entries. Exclude the insertion write and the replacement write from the shift count. Enter each answer as an exact integer, to zero decimal places.


Ten initial list entries are shown with indices zero through nine.


Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More List ADT Questions: