Find the winner in the Game
$10-30 AUD
货到付款
Consider the following children's game:
• ’n’ children stand around a circle.
• Starting with a given child and working clockwise, each child gets a
sequential number, which we will refer to as the child’s ‘id’
• Then starting with the first child, they count from 1 until ‘k’, where ‘k’ is
determined at the start of the game. The child who counts ‘k’ is now out and
leaves the circle. The count starts again with the child immediately next to the
eliminated one.
• Children are so removed from the circle one by one. The winner is the child
left standing last
Write a program which is memory and time efficient to find the winner, for a given n and k
项目ID: #18193971
关于项目
授予:
Hello I am Java expert and interested in this project. I am familiar with this problem commonly known as Josephus problem and can help you with this project. Please communicate to discuss further. Regards Anshu
有5名威客正在参与此工作的竞标,均价$54/小时
Hi there, I can help you out with the task. When is the deadline ? Also, you need it in c++, right? Thanks, Adeel
Hy I am an engineer and have delivered many programming projects. You can share more details about your project. Thank you
I can solve this problem using dynamic programming with give to you within 12 hours in C++ with proper commented code.