ProgrammingHard

In records (x,5), (y,2), (z,5), (w,2), (v,9), the index of the minimum key, choosing the first when there are ties, is which index?

  1. A. 3
  2. B. 0
  3. C. 4
  4. D. 1

Correct answer: D. 1

The first record with the minimum key 2 is y at index 1. Using < instead of <= for the update keeps the first one.

More C Programming questions

Exams that ask this topic