This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
A king has 9 soldiers on each side of his castle, doing guard duty. @@@ @@@ @@@
@@@ castle @@@ @@@ @@@ @@@ Part 1: War breaks out, and he needs 4 of these men to go fight. He still wants 9 men guarding him on each side, with men in the centre and sides positions as originally. How does he do it with the remaining men? Part 2: They win the war, and the 4 men came back to guard duty. But for safety reasons he wants an additional 4 men guarding him. He still wants only 9 on each side etc. etc. (as part 1), but with the four additional men added to the original amount of men. How does he organize the men?
Unfortunately HTML is disabled in this forum, so I can't hide my answer in the same color font as the background.... SO... if you don't wanna see my solution, don't scroll down!!! blah blah blah blah ok -- here it is: 9 on each side, 20 men total
9 on each side, 28 men total:
[ November 20, 2003: Message edited by: Jessica Sant ]