My favorite programming contest problems

Laszlo Szuecs · Journal of computing sciences in colleges · 2001

The problems discussed in this paper are delightful brainteasers. Even though they were devised for programming contests, they can be used as interesting assignments in programming courses at various levels of expertise. The problems are: (1) What happens if the hour hand and the minute hand of a clock are interchanged? (2) Given the number on a ski lift chair moving up, and the number on the opposite chair moving down, calculate the remaining time of the ride. (3) Given the nationalities of a person's ancestors, calculate the percentage of each nationality represented in the person. (4) What is the minimum percentage of popular votes a candidate would need in order to win an election that is conducted through an electoral college?

Read the paper · More papers on PaperTik