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 PMKhaoula / Kayla Caty
12 AnswersNew Answer
Hello! 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
Oh okay, thank you!
I basically don't know where to start 🥺
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.
No its java programmint, and we specifically need to use recursion
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.
Okay, thank u so much ❤
Use this as a blueprint to finish your assignment https://code.sololearn.com/cFz8Zn13NQvE/?ref=app
Oh wow, did u try it, did it work? is it recursion?
No, I did not finish it. You will need recursion to ignore the pairs of playera that lose
Wanna to learn html