You have four colored cubes. Each side of each cube is a single color, and there are four colors: blue (B), red (R), green (G) and yellow (Y) Describing the six faces as front, back, left, right, top, bottom, the cube colors are:
Cube Front Back Left Right Top Bottom
1 R B G Y B Y
2 R G G Y B B
3 Y B R G Y R
4 Y G B R R R
The objective is to find ways to stack the four cubes as a vertical column so that each side of the column is showing all four colors.
In a compiled language of your choice, need a program to find all successful permutations.

JurePosted Nov 6, 2010, 9:35 PM
The trick is to think just about cube's vertical faces. I named groups of them "rings" and there are 3 such groups (around, over, over sideways), but you should also consider flipping the cube on the head (mirrored rings), so 6 rings in total per cube. Basically, every side is at the bottom/top/... once and there are 6 sides.
Then you should also think about rotating the cube around its Y-axis. I named such rotations "shifts", since the group (or list) of vertical faces shifts. There are 4 of them. But we can forget about 1st cube, because rotating it has no effect.
So that's 82944 unique stacks (6 sides, 4 possible shifts, 1st cube doesn't need to shift -> 6^4 * 4^3). Both solutions were found instantly (no delay noticed).
Sam HobbsPosted Jan 27, 2011, 4:14 PM
Suthish NairPosted Jan 27, 2011, 2:52 AM
Did you really read the thread, before posting your reply.
Or is this a kind of spamming?
Thomas McNeelyPosted Jan 27, 2011, 12:57 AM
I think you should post crap like this on answers.yahoo.com rather that fill this forum with senseless babble.
Suthish NairPosted Dec 11, 2010, 3:24 PM
Manikavelu VelayuthamPosted Dec 11, 2010, 8:45 AM
Mahesh ChandPosted Dec 10, 2010, 8:36 AM
Suthish NairPosted Dec 9, 2010, 11:18 PM
"DO NOT include any compiled binary code (.exe ) as it could be rejected by mail clients?"
Manikavelu VelayuthamPosted Nov 1, 2010, 6:06 AM
Actually it was a question asked in an interview.
Suthish NairPosted Nov 1, 2010, 6:02 AM
DO NOT include any compiled binary code (.exe ) as it could be rejected by mail clients?
Outsourcing job?