views:

140

answers:

6

Hi guys,

What is a classic programming puzzle which will require a lot of conditional logic and branches to solve?

Thanks

+5  A: 

Eight queens and Towers of Hanoi are classics. Solving Sudoku is quite interesting too and is really a graph coloring problem in disguise.

Jason
+1 for Eight queens.
Anthony Forloney
where is conditional statements in **Hanoi** problem? it can be wrote without `if`
SaeedAlg
+1  A: 

Sudoku

Luc M
+1  A: 

Here are a lot of small programming puzzles. a Lot of them are about logic

Jan
Project Euler has lots of stuff too.
CodeInChaos
A: 

If the purpose is for an interview (i.e. you need to have a candidate bang out some code as part of the evaliation process), I've always liked Project Euler question 11.

If it's for your own use to learn a new language, etc. I prefer some of the code kata at codingdojo.org (the OCR one is pretty entertaining in any language).

Bob Palmer
A: 

Chess and Tic Tac Toe and Dot and Lines are good ones

SaeedAlg