Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Josephus problem #23

Open
Ankit152 opened this issue May 18, 2021 · 1 comment
Open

Josephus problem #23

Ankit152 opened this issue May 18, 2021 · 1 comment
Assignees
Labels

Comments

@Ankit152
Copy link
Owner

Given the total number of persons n and a number k which indicates that k-1 persons are skipped and kth person is killed in circle in a fixed direction.

The task is to choose the safe place in the circle so that when you perform these operations starting from 1st place in the circle, you are the last one remaining and survive.

Input:
n = 3 k = 2
Output: 3

@saptarshiweb
Copy link
Contributor

Hi,
I have a good understanding of C++ STL. I am interested to solve this problem. Kindly, assign this issue to me.
@Ankit152
Regards,
Saptarshi Mandal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants