jump to navigation

Problem of the Day #427: Batting Averages January 2, 2013

Posted by Saketh in : potd , trackback

Kanga and Roo wrote software to keep track of their friend’s baseball stats. Now, they want to rank their friends by batting average.

Unfortunately, the software is a little finicky. It only responds to queries of one kind: given three players $A$, $B$, and $C$, it can report whether the statement “$A$ has a lower batting average than $B$, who has a lower batting average than $C$” is true.

If Kanga and Roo want to create a ranking of $N$ of their friends, determine the least number of queries they must make.

Comments»

no comments yet - be the first?