-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Added Josephus Problem in C++ #1559
Conversation
conflicts to be resolved @YASH01009 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YASH01009 Add non-recursive form too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use better name for your variables and format input output to make the code more understandable.
@@ -0,0 +1,35 @@ | |||
/** | |||
Josephus problem is a famous problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add problem link from any competitive programming website.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do add the same.
changes done !! |
C-Plus-Plus/cp/Josephus.cpp
Outdated
Time Complexity : O(n) | ||
Space Complexity : O(1) | ||
|
||
**/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a new line at the end of the Code.
@@ -0,0 +1,35 @@ | |||
/** | |||
Josephus problem is a famous problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do add the same.
Have you read the Contributing Guidelines on Pull Requests?
(Yes)
Description
(Added Josephus Problem in C++)
Checklist
README.md
and link to my code.Related Issues or Pull Requests
(Issue #1525 is solved here)