NYCPHP Meetup

NYPHP.org

[nycphp-talk] Questions to ask at a job interview?

Michael Southwell michael.southwell at nyphp.com
Sun Jul 8 13:11:18 EDT 2007


At 11:25 PM 7/7/2007, you wrote:
>Write an algorithm (not language specific code) to do the following:
>
>Players is a variable holding the number of players in a single
>elimination tournament. If you loose a match, you're out. The
>winner is determined when there is no one left to play.

This is trivial:
number of matches required to get a winner = number of players - 1
explanation:
one match eliminates one player
every player but one must be eliminated to have a winner
therefore.......


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses





More information about the talk mailing list