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 1 working #7

Open
AyushKoul00 opened this issue Jul 25, 2021 · 1 comment
Open

Josephus Problem 1 working #7

AyushKoul00 opened this issue Jul 25, 2021 · 1 comment

Comments

@AyushKoul00
Copy link

I saw that you had a really good solution to the CSES problem Josephus Problem 1 but I was unable to understand how and why it works. Can you elaborate on its working or provide a resource that explains it? Everywhere I looked only has solutions using extra memory or some other complicated method.

Also, what is the time complexity of your solution? Finally, how can we generalize the solution to any value of k?

@Khemendra-Bhardwaj
Copy link

I saw that you had a really good solution to the CSES problem Josephus Problem 1 but I was unable to understand how and why it works. Can you elaborate on its working or provide a resource that explains it? Everywhere I looked only has solutions using extra memory or some other complicated method.

Also, what is the time complexity of your solution? Finally, how can we generalize the solution to any value of k?

did u able to find it out ?

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

No branches or pull requests

2 participants