Confirming your payment

Skip to content

Practice Questions · Question 13 of 20

For a school concert, the booked seat numbers in Row C are kept as a list in increasing order: [3, 8, 15, 21, 30, 42…

Question 132 marksMedium

For a school concert, the booked seat numbers in Row C are kept as a list in increasing order:

[3,8,15,21,30,42,57,66][3, 8, 15, 21, 30, 42, 57, 66]

Row C booking list: eight boxes showing 3, 8, 15, 21, 30, 42, 57, 66 in order

To answer a parent's question, the usher reads the list from the left, one entry at a time, and stops as soon as she finds the seat or reaches an entry larger than it. Count one comparison for each entry she reads.

(i) A parent asks for seat 35. Is it booked, and after how many comparisons does the usher know?

(ii) How many comparisons does she need for seat 57? If the list were kept in no particular order, how many comparisons would she need to be sure that seat 35 is not booked? Why?