Directi Interview Report
- 1of 1 vote
AnswersGiven an array of N positive integers, N being even, and a number K, find out if it is possible
- sam March 22, 2013 in India
to form pairs of the numbers present in the array such that the sum of numbers in each pair is
divisible by K.| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer Algorithm - 0of 0 votes
AnswersAlice and Bob are playing a game. The game is played as follows :
- sam March 22, 2013 in India
- There are N piles of coins on the table. Pile i has A[i] coins.
- In each turn, each player can pick up 1 or more coins from the leftmost non-empty pile.
- If a player picks up a coin from pile i , all coins from piles 0 to i-1 should have been taken.
- The person who picks up the last coin loses the game.
Alice and Bob play the game alternately. Alice plays first. Given the number of piles N and the
number of coins Ai in pile i, you have to determine which player will win the game, assuming
both play optimally.| Report Duplicate | Flag | PURGE
Directi Software Engineer / Developer Brain Teasers