## Techlogix TATA Consultancy Services Interview Question for Software Engineer / Developers Consultants

• 0

Country: pakistan

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

Following are my suggestion :-
Method 1 :-
1> First Stroke :- Cut Horizontal.
2> Second Stroke :- Cut Vertical.
3> Third Stroke :- Cut Across the Height of the Cake.

Method 2:-
1> First Stroke :- Cut Horizontal.
2> Second Stroke :- Cut Vertical.
3> Pick each of these pieces and stack upon each other making a pile of 4 pieces.
4> Third Stroke :- Cut through all the 4 pieces.

Comment hidden because of low score. Click to expand.
-2

method 2 . its wrong, if we cut the 4 piled pieces, we can't get 8 equal pieces because it is circle.

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

view the cake as cylindrical.cut it along middle completing a circle.This makes 2 cylinders.Now 2 cuts both make + symbol.so 8 pieces

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

First make 2 cuts perpendicular to each other on the top then one in the middle (along the axis)

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

cut 1:-cut vertically.
cut2:- superimpose the two pieces and cut again in two equal pieces.

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

after cutting the cake horizontaly and vertically put all pieces over one another and cut from middle 8 equal pieces

Comment hidden because of low score. Click to expand.
0

Think 3 dimensional. cut along x axis, y axis and z axis

Comment hidden because of low score. Click to expand.
0

Cut the cake halfway it's height, then cut the cake in 2 perpendicular lines

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

A small extension for this que.I was asked to cut in 8 pieces such that everybody gets cream also.Note that in the above que 4 people wont get a cream

Comment hidden because of low score. Click to expand.
0

yes . this way everyone will get cream .. good solution .. ie put 4 peices , one over other and then cut vertically

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

a. Make 2 cuts perpendicular to each other. (It will make 4 pieces)
b. Then stack all 4 of the pieces and then split all four of the stacked pieces with the third cut. It will make 8 pieces.

You might think of this as sort of a trick question, since moving the pieces is something “out of the box” – but somebody asking this question is probably looking for that kind of out of the box thinking. .

Comment hidden because of low score. Click to expand.
0

Nice solution dude, keep it up..

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

you get four pieces in two cut,and pile up the four pieces then cut from top to bottom.it's 8 pieces

Comment hidden because of low score. Click to expand.
0

I think that's the right approach. If piling is too messy, you could also lay out the cake pieces one next to the other two-dimensionally and make the cuts. So cut in two, put one half below the other, cut. Then take the four resulting pieces and align them all so that a line goes through their middles and make the third cut.

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

How about cutting round slices off the height of the cake ?

Comment hidden because of low score. Click to expand.
0

if u cut 3 round pieces vertically. you can get 7 pieces at max. If cutting round is even allowed.

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

My approach .......
first stroke : cut cake horizontaly in between .
and by the remaning two strokes make X on the cake .

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

1) cut cake from 12 o'clock direction to 6 o'clock direction.
2) cut cake from 3 o'clock direction to 9 o'clock direction.
3) cut the cake in half horizontally, slicing through all the pieces.

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

1. the cake into two concentric circles of equal area
2. cut the cake vertically
3 cut the cake horizontally

you will get 8 equal pieces of cake of equal area

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

1.cut the cake into 2 halfs
2.place one on another then make it four pieces(both 8 pieces)

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

1. Cut cake in 2 half.
2. Put this 2 half in a row which make DD cut them in 2 half
3. Put all piece in a row cut all of them in 2 half it will make 8 piece

}
All piece has cream and not spoil beauty of cake

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

first cut it horizontally.then it becomes two pieces.then cut the two pieces vertically.results into 8 pieces

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

We have to cut3 cakes into 8 pieces with a knife

Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0

No question is dumb

Comment hidden because of low score. Click to expand.
0

khasif is right.

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.

### 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.