Counting copied event identifiers

A logging program starts with an empty dynamic array of capacity 3 and appends 70 event identifiers. Whenever the block is full, a resize replaces it with a block of twice the capacity and copies every existing identifier once. Count only copies of existing identifiers, excluding writes of newly appended identifiers. How many identifier copies occur in total? Give your answer in copies, to zero decimal places.

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 Dynamic Arrays Questions: