Interview Question for Software Engineer Interns


Country: United States
Interview Type: In-Person




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

Simple : on Cube 1 : 0,1,2,3,4,5
On Cube 2 : 0,1,2,6,7,8
Now 6 can be interchangeably used as 9 that does the trick.

- shyamal.pandya September 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 4 votes

What about:

1 2 3 4 5 6
1 2 7 8 9 0

Now you don't have to use 6 as 9! ;)

- EOF September 29, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Now, how would you show "13"?

- xaSAXASXAS October 30, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@EOF - you won't be able to make 07 and 08.. One of the requirements of the question is using both the cubes together. Always.

- rpisid October 30, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Dates 11 and 22 have repeated values i.e. '1's and '2's. So both the cubes need to have a 1 and a 2 on them. We have 4 faces left on each cube. 3,4,5,6 on one cube. 7,8,9,0 on the other.

- Varun Shah September 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@Varun:- I thought through the same solution but i was thinking over one aspect of it. I was thinking that both the cubes have to be used all the time so both cubes should have 0 common as well but in that case we will have to miss out on one of the other numbers. But if we can just show single digit numbers using just 1 cube then this seems to be the only solution.

- Anonymous September 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The first answer is the right one. To represent all single-digit dates you need both to contain 0, 1, and 2. Then if one has 3, 4, 5 and the other one has 6 (or 9), 7, 8 then dates 1 - 9 are accounted for. Apply the same method for dates 10 - 19, 20 - 29, and 30 - 31.

- ArtL October 08, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

cube 1) 1, 2, 6, 7, 8, 9
cube 2) 0, 1, 2, 3, 4, 5

- JOS October 09, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

both cubes numbered 0-5 but using base 6 so
1=>0,1
6=>1,0
7=>1,1
31=>5,1

- chapowski October 24, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

cube-1: 0,1,2,3,4,5
cube-2: 0,1,2,6,7,8

- Anonymous November 13, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Why not just :
123456
012789

- lem November 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Cube 1: 0,1,2,4,5,6
Cube 2: 0,1,2,3,7,8

In this case you would use 6 interchangeably as 9 and all numbers are represented.

- Y. January 01, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Only last ans seems correct as in all others, all single digits cannot be represented.

- Anonymous January 21, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Cube 1: 9, 1, 2, 3, 4, 5
Cube 2: 1, 2, 6, 7, 8, 0

Just go through all days of month (from 1 to 31) and you will see that they can be created using these two cubes.

No need to use put 6 upside down to show 9.

- Leo July 27, 2015 | 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