TCS
Company
A & B are playing a game .There are 8 oranges in a row on the table.one Player can take 1-4 oranges in a pick (a maximum of 4),one who picks the last orange wins the game.'A' plays first How many oranges should he pick first time inorder to win the game.
Read Solution (Total 3)
-
- their is a formula for this kind of Q's if some N no. of things are given and if max. and min are given................
the formula is....losing strategy=(min+max)k.. where k=0,1,2,3.....
so if B has the losing strategy in our problem means,A wil win..
so, losing strategy=(1+4)k
if k=0.....=>losing strategy=0 but they cant pick 0 oranges.
so,if k=1 ...=>losing strategy=5...if A picks 3 in the 1st turn he can win.....
so ans=3 - 13 years agoHelpfull: Yes(11) No(2)
- A should have to pick 3 oranges in his first time in order to win the game
- 13 years agoHelpfull: Yes(2) No(0)
- if first takes 1 orannge ,2 may take upto 4 then remaining 3 can b taken by 1st at 2nd turn
if first takes 2 orannge ,2 may take upto 4 then remaining 2 can b taken by 1st at 2nd turn
similarly if A takes oranges below 4 ,he may win - 13 years agoHelpfull: Yes(1) No(5)
TCS Other Question