Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

the question is "how many cubes remain" - the answer is 512 ( ie 8*8*8) pieces. If the question was "how many cubes on the outer layer" then the answer would have been 10*10*10 - 8*8*8

- prep4Inter February 03, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

in a 3 X 3 X 3 rubiks cube , there are a total of 24 units [ 8 corner pieces , 4 centre pieces , and 12 edge pieces ] , there are 12 edge pieces = 4 pieces that have one face on the top and the other on the side + 4 pieces that have one face on the bottom and the other on the side + 4 pieces that have both faces on the sides.
If you rip all of these apart, there is nothing left !


And similarly , in a 10 X 10 X 10 rubiks cube there should be total of 548 units [
8 corner pieces [ 4 on top and 4 on the bottom], 64 edge pieces and 486 centre pieces. Thats a total of 548 pieces on the outer layer.
Typically if you break open this cube, nothing would remain. But for the sake of the question , lets assume that the 10 X 10 X 10 cube has been made of smaller such cubes. if the outer layer is removed = it should give 1000 - 548 = 452 pieces !!

its = 452 pieces for sure!

- DSnake January 26, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

its a very common interview Q;
Removing the outer layer of 10X10X10 cube will give you a 8X8X8 cube.

- pk January 26, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

You should put Edge of cube length, Number of centermeter cubes total, number of cubes with three painted faces, number of cubes with two painted faces, number of cubes with one painted face, and number of cubes with zero painted faces. I think you should add all this information form 1x1x1 to 10x10x10 type of cubes.

- Rebecca Santiago March 12, 2018 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More