Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

essential problems?

Name: dasuraga !8GgBtN/zr. 2010-01-06 14:43

What do you guys think are some problems that most all programmers should be able to write in under 5 minutes? For me, I'd guess Hanoi should be an essential one: writing a function Hanoi(char* letters,int number,int to,int from,int temp) to solve the tower of hanoi problem for 3 slots(the letters array has the disc identifiers in decreasing order) You are supplied with the function move_single(char id,int to,int from) that moves the top disc on the to slot to the from slot(assumes it to be possible).

Name: Anonymous 2010-01-14 9:57

>>27
bah humbug.
if you can unroll loops, you can unroll recursions.
it's possible without using recursion and without using loops, AND without using if statements.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List