You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
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?
The text was updated successfully, but these errors were encountered: