TCS Company

Mr. Bean went to a shop for buying a gift to his wife on her Birthday. He bought 28 purple marbles as her wife was fond of marbles. He also bought 21greem marbles. While coming out of the shop on the way he also bought 24 red, 42 yellow and 12 pink marbles and he put them all in a bag. When he was returning back to the home a lightning occurred and suddenly due to some reasons the red, green, and yellow balls got converted into white color. But in spite of this Mr. Beans decided to give few marbles to his lovely wife. So, how many times he should put his hand in the bag so that he can gift his wife at least one ball of each color.

Read Solution (Total 2)

TCS Other Question

Given 3 lines in the plane such that the points of intersection form a triangle with sides of length 20, 20 and 30, the number of points equidistant from all the 3 lines is
a) 4 b) 3 c) 1 d) 0
Alice and Bob play the following coins-on-a-stack game. 50 coins are stacked one above the other. One of them is a special (gold) coin and the rest are ordinary coins. The goal is to bring the gold coin to the top by repeatedly moving the topmost coin to another position in the stack.Alice starts and the players take turns. A turn consists of moving the coin on the top to a position i below the top coin (0 ≤ i ≤ 20). We will call this an i-move (thus a 0-move implies doing nothing). The proviso is that an i-move cannot be repeated; for example once a player makes a 2-move, on subsequent turns neither player can make a 2-move. If the gold coin happens to be on top when it's a player's turn then the player wins the game. Initially, the gold coinis the third coin from the top. Then
a) In order to win, Alice’s first move should be a 0-move.
b) In order to win, Alice’s first move should be a 1-move.
c) Alice has no winning strategy.

d) In order to win, Alice’s first move can be a 0-move or a 1-move