title: Explain example of giving K-th largest number of numbers from each of N given sets?
body: <p>Today I tried to solve a <a href="https://facebook.interviewstreet.com/recruit/challenges/" rel="nofollow noreferrer">Facebook Programming Challenge</a>. The challenge that I got was the 'Bar problem', which can be found <a href="https://github.com/alonsovidales/facebook-programming-challenges/tree/master/bar" rel="nofollow noreferrer">here</a>. My problem during the course of the challenge was to understand the first example that they provided.</p>
  <p>The problem can be summarized as follows:</p>
  <blockquote>
  <p>N friends are playing a game. Each of them has a list of numbers in front of himself.</p>
  <p>Each of N friends chooses a number from his list and reports it to the game administrator. Then the game administrator sorts the reported numbers and shouts the K-th largest number.</p>
  <p>You want to know the count all possible numbers that the game administrator can shout.</p>
  </blockquote>
  <p>To that point I thought that I had understood the problem but then they presented the following example:</p>
  <blockquote>
  <p>In the sample example given, for the first testcase N = 3 and K = 3. List for the first person is {2 5 3}, {8 1 6} for second and {7 4 9} for the third. In this case all the numbers in {4, 5, 6, 7, 8, 9} have a chance to be the third biggest selected number.</p>
  </blockquote>
  <p>So my question is:</p>
  <p><strong>How can 7, 8 and 9 be the third biggest selected number?</strong></p>
  <p>In my opinion only the numbers {1, 2, 3, 4, 5} can be third biggest number but maybe I misunderstood the algorithm.</p>