# Assignment for CS 🥺

You are holding a contest to determine the ultimate penny champion. Each participant in the contest has decided which side of the penny they like, heads or tails, and keeps that decision to themselves. We represent heads using the boolean value true and tails using false. The contest participants all get in a long line (array). They start by pairing up (the first two, second two, and so forth). After the two members reveal their pennies to each other, if both are the same, the first (left) person wins, otherwise, the second (right) person wins. The remaining members then battle it out the same way in the next round until only one winner emerges. If there are an odd number of people in any round, the last person gets a “bye” and automatically survives to the following round. Solve the problem recursively by writing the following method: public static int champion(boolean[] a) Return the index corresponding to the winner of the contest. You do not need to allocate any arrays for this problem

1/22/2020 10:34:38 PM

Khaoula / Kayla Caty12 Answers

New AnswerHello! Do you have an attempt at this problem? If you need help with it, please be specific with what exactly is giving you issues as otherwise there'll be little that can be done to help

Where is it from? If it is from school, your teacher should have told you the basics of C#. You could check out SL's course to get some help. It explains data types, loops, etc.

Since I find it interesting, I will see what I can do with it in a few hours. I'm not making any promise, tho.

Use this as a blueprint to finish your assignment https://code.sololearn.com/cFz8Zn13NQvE/?ref=app

No, I did not finish it. You will need recursion to ignore the pairs of playera that lose