Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


There are N egg baskets and the number of eggs in each
basket is a known quantity. Two players take turns to remove
these eggs from the baskets. On each turn, a player must
remove at least one egg, and may remove any number of eggs
provided they all belong to the same basket. The player
picking the last egg(s) wins the game. If you are allowed to
decide who is going to start first, what mathematical
function would you use to decide so that you end up on the
winning side?

Answers were Sorted based on User's Feedback



There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / guest

i need answer for it

Is This Answer Correct ?    4 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / playboy

There are N buckets & each contains n eggs in it.
Then let opponent to start a game.
If opponent picks x eggs then u choose n-x from perticular
bucket.

This way u can win...

Is This Answer Correct ?    2 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / khushboo

It is said that there are N egg bags with eggs in it. So
every bag should have eggs..
Now answer depends on Number of Bags containing only one bag

Suppose there is
1. all bag contains more then 1 egg then I will choose first
2. only one bag with one egg then I will choose second
3. Two bags contain one egg I will choose third..

So It depends on how I reach to the last bag in first place

Is This Answer Correct ?    1 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / lokesh

if the XOR of all the numbers of eggs is zero than second
player win else first player will win.
(From NIM game(game theory))

Is This Answer Correct ?    1 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / guest

n-1 if n is odd and n+1 if n is even

Is This Answer Correct ?    0 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / guest

n-1 if n is odd and n+1 if n is even

Is This Answer Correct ?    0 Yes 2 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / ghfhj erwe

0

Is This Answer Correct ?    1 Yes 4 No

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take..

Answer / rahul

N%2

if it gives 0 then the person can choose to go second.if
nonzero then he should go first.But this logic is acceptable
only if there is atleast one egg in each basket.

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More C Interview Questions

Explain what are the different file extensions involved when programming in c?

0 Answers  


write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.

1 Answers  


create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.

4 Answers  


what is printf

5 Answers   MVSR, Satyam,


Why is a semicolon (;) put at the end of every program statement?

0 Answers  


Explain how can I pad a string to a known length?

0 Answers  


please send me the code for multiplying sparse matrix using c

0 Answers  


write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


What is array within structure?

0 Answers  


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

0 Answers  


Can U write a C-program to print the size of a data type without using the sizeof() operator? Explain how it works inside ?

3 Answers   HCL, TCS,


Categories