Amazon Interview Question for Software Engineer / Developers






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

Acute angled triangle can be formed by connecting the diagonal of three adjacent faces of the cube.
The number of ways three adjacent faces can be chosen is (6x4x2)/(3x2x1) = 8
So the total number of acute angled triangle is 8.

- Tulley March 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I do think 8 is the correct answer.
But could you please explain how you arrived at
(6x4x2)/(3x2x1)

I got my answer by brute force approach. I am now trying to find a formula::))

- xyz March 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I do think 8 is the correct answer.
But could you please explain how you arrived at
(6x4x2)/(3x2x1)

I got my answer by brute force approach. I am now trying to find a formula::))

- xyz March 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
2
of 2 votes

Well it's 3 faces, /surrounding a corner/; each set of these faces has that corner in common, at its 'center', so to speak. So it's the number of corners.

- JeffD January 15, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Easy way to think about this is start with the bottom vertex. Extend two lines from this vertex to the opposite side ( top 2 vertices ) .We have 1 acute triangle. We can repeat this process for every other vertices(which is 8). Therefore,we have 8 acute triangles.

- novice March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

To form an acute triangle you can only choose vertices that are not connected by an edge to each other in the cube. There are two sets of 4 such vertices (diagonals on the first face and the opposite diagonal on the bottom face). In each such set choosing any 3 would form an acute Triangle. So the answer would be 2*4C3 = 8.

- YBS March 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Sorry - wrong answer.

- YBS March 22, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

0

- prashant March 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The correct answer is 0, since , in each of the triangle formed will have a right angle involved.

- Namrata May 22, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

An acute angled triangle has ALL angles less than 90*.

So yes no. of acute angles that can be formed = 8.

- souravghosh.btbg March 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How do you guys come up with 8? Can you please explain?

- K March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

it is 24
in every face we can form 4 acute triangles.
there are six faces...so 6*4 = 24

- rider3125 March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

it is 24
in every face we can form 4 acute triangles.
there are six faces...so 6*4 = 24

please correct me if I am wrong....

- rider3125 March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

A triangle formed in a face is not acute, since one of the angles is a right angle.

- novice March 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Assumption: It'a an equi cube( all edges are of equal length and you can't distinguish between any two sides/edges).

The Answer is 3

1) you can select 2 vertices of an edge, and select the third vertix as one of
vertices of diognally opposite edge. (2 ways).
2) you can select 3 vertices in such a way that no two are on same edge. (only one
way)

- MOM March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Answer is 8

- SRB March 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2 3
1 4

6 7
5 8
image you have a sword cut 2-4-5, which will make a acute triangle, and this can be seen as well as cutting corner 1, so how many corners that you can cut? the answer is 8

- Anonymous March 24, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

2-------3
 /       /|
1-------4 |
|       | |
| 6     | 7
|       |/
5-------8

- Anonymous March 24, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

There are total of 24 Acute Triangles in a Cube

------1--------2
3--------4

------5--------6
7--------8



(1-2-3-4)
1-4-7,----->[[1]]
1-4-6,------->[[2]]
2-3-5,--------->[[3]]
2-3-8,----------->[[4]]

(2-6-8-4)
2-8-3,----------->(4)
2-8-5,------------->[[5]]
4-6-1,------->(2)
4-6-7,----------------->[[7]]

(1-2-5-6)
1-6-7,--------------->[[6]]
1-6-4,------->(2)
2-5-3,--------->(3)
2-5-8,------------->(5)

(1-5-3-7)
1-7-4,----->(1)
1-7-6,--------------->(6)
3-5-2,--------->(3)
3-5-8,------------------->[[8]]

(3-4-7-8)
3-8-5,------------------->(8)
3-8-2,----------->(4)
4-7-1,----->(1)
4-7-6,----------------->(7)

(5-6-7-8)
6-7-1,--------------->(6)
6-7-4,----------------->(7)
5-8-2,------------->(5)
5-8-3,------------------->(8)



But, Unique Triangles are 8.

1-4-7,----->[[1]]
1-4-6,------->[[2]]
2-3-5,--------->[[3]]
2-3-8,----------->[[4]]
2-8-5,------------->[[5]]
1-6-7,--------------->[[6]]
4-6-7,----------------->[[7]]
3-5-8,------------------->[[8]]

- SRP March 24, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

None of those are acute - the Acute ones are: (2,4,5), (1,3,6), (2,4,7), (1,3,8), (1,6,8), (2,5,7), (3,6,8) and (4,5,7)

- YBS March 25, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

12 diagonals
for every diagonal, 2 vertices using which an acute angle can be formed.
24 permutations in total but 8 combinations
Ans. 8

- Anonymous March 24, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

for me answer is coming 12

- Pagal Guy March 26, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Total number of triangles that can be formed = 8C3 = 56
Each diagonal on each surface of the cube gives rise to 2 right angled triangles, and there are two such diagonals for each surface and 2 * 6 = 12 such diagonals
Therefore, total number of right angled triangles = 12 * 2 = 24
The rest of them are acute angled triangles i.e, 56 - 24 = 32

- raj March 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

are you serious???
if you want to use C83 to solve this problem, you should use C43 for each surface.
the number of right angled triangles on each surface is 4. 4*6 is 24. and there are other 6 surface in side the cube. another 24. 56-24-24=8...so the answer is 8.

- Anonymous March 31, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

ans is 32.
for each edge we have 2 possibilities to choose the 3rd vertice to form a acute triangle.So 12 edges means 24 triangles.

8 other tringles can me made which does not form an edge.

- Anonymous May 11, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i think it is 0
bcoz,in a cube when we join any 3 vertices it will always form a right angled triangle.
so,no acute angled triangle is formed.
i think so.....

- sumeet saini July 16, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Suppose x is the distance between the two poles.Now , x/2 + (15-7) should be less than 16/2 which is not possible. So the poles aren't apart

- krannycool September 20, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

8 is the correct answer. Draw the cube, draw all possible equilateral triangles possible, eliminate the duplicates.

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

/|\
/ | \
/ | \
/ - |- \
\ | /
\|/
Ans 4. Think about a 3D structured triangle pyramid using 6edges.. Other 2 edges useless

- Anonymous October 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

12

- raj February 04, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The answer is 8 triangle.
Total number of triangles are 56. 8C3.
Now total number of Right angle triangles are 8*6. From each surface 8 right angle triangles are formed. 4 on the surface and 4 in which diagonally bottom corner is used.

So acute trianges are 56-48=8

- apex December 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Knimaimsismik

- Anja March 20, 2022 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

ans: 24 ?
total faces: 6
each face: 2 diagonals.
with each diagonal - 2 equil triangle with the diagonals of the adjacent sides to it
=> 6*2*2 = 24 !!
correct me if im wrong :)

- 1919 March 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Wrong!

- Anonymous March 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think 24 is right....

- Anuj April 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think 24 is right....

- Anuj April 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

wrong... u forgot to take out the dupes... its hard to explain in words just number the vertices as 1234 and ABCD and then u will see that there are only 8 unique triplets ...

- jenen November 10, 2011 | Flag


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