There are N people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom.
Given the total number of persons N and a number k which indicates that k-1 persons are skipped and the kth person is killed in a circle. The task is to choose the person in the initial circle that survives.
Proposed Changes:
In this issue if ansth person is executed, ans+1th will be the next starting safe point the recursive call.
there by we will update the value of ans to ans+1
Additional Information (if any):
none
Note:
Please make sure to follow the guidelines mentioned in the README file.
Commit your changes frequently and use descriptive commit messages.
Issue Type: Fix Bugs
Description:
There are N people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom.
Given the total number of persons N and a number k which indicates that k-1 persons are skipped and the kth person is killed in a circle. The task is to choose the person in the initial circle that survives.
Proposed Changes:
In this issue if ansth person is executed, ans+1th will be the next starting safe point the recursive call. there by we will update the value of ans to ans+1
Additional Information (if any):
none
Note:
Happy coding! 🚀