Finding the input limit from total memory

A record-sorting service has a total memory budget of 1000000 bytes. Its input occupies 24n24n bytes for nn records. During sorting, an auxiliary buffer occupies another 8n8n bytes and a fixed stack occupies 4096 bytes. All three allocations are live simultaneously, and no other memory is charged to this budget. What is the maximum number of records that fit? Answer in records, as an integer with 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 Sorting Algorithms Questions: