Answer to Question #332142 in Python for sandhya

Question #332142


before the game start,they flip a coin to decide the starting player

the starting player choose a box & places the ball in it

if the ramesh starts he always places the ball in the box containing the biggest number

similarly suresh places the ball inthe box containing the smalllest number

after in each turn the player can move the ball one box to the left or one box to the right

ramesh plays such that he always moves the ball to the box containing a bigger number

suresh always moves the ball to the box containing a smaller number

ramesh plays in such a way that when the game ends,the number on the box which contains the ball is the biggest possible on the contry, suresh wants this number to be te smallest possible the result of the game is the number written on the box containing the ball after k turns write a program to determine the result of the game

i/p:2

4 3 0

4 1 9 5

4 3 1

4 1 9 5

o/P:

9

1



0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS