Added Josephus Problem in Python - #1933
AakashBelide wants to merge 1 commit into
Conversation
Josephus problem solution using recursion
jrg94
left a comment
There was a problem hiding this comment.
Very cool idea! Any chance we could get this documented here first: https://sample-programs.therenegadecoder.com/projects/
|
@jrg94 absolutely sure! Could you please tell what's the procedure to get this documented? Thanks in advance |
|
Absolutely! Here's the list of projects (as examples): https://sample-programs.therenegadecoder.com/projects/ You'll want to head over to this repo: https://github.com/TheRenegadeCoder/sample-programs-website Go into this folder: https://github.com/TheRenegadeCoder/sample-programs-website/tree/master/projects And, add a new folder with an index.md file using this template: https://github.com/TheRenegadeCoder/sample-programs-website/blob/master/templates/PROJECT_ARTICLE_TEMPLATE.md |
|
As guided, I have made a new folder with an index.md file using the provided template. Kindly check PR #331 in TheRenegadeCoder /sample-programs-website. If there is anything else to be changed, kindly let me know. |
|
Finally got around to it! When it does get approved, we'll ask you to add testing to this pull request. |
|
Great! I have made the suggested changes. Thank you for all the help! |
|
Okay! Now that the article is in place. Any chance we could start writing tests? |
Yeah sure. I haven't written code for testing anytime so far, so can you just guide me about it? I just checked a few files in the test folder in the sample-programs repo. |
|
Yeah it's a little complicated. Basically, you would need to add a new instance for the test:
Then, you'll need to create a file here: https://github.com/TheRenegadeCoder/sample-programs/tree/master/test/projects. You can use the other test files as an example. A good example might be Binary Search: https://github.com/TheRenegadeCoder/sample-programs/blob/master/test/projects/test_binary_search.py |
|
Okay. I will update you ones it's done. Thank you |
|
If you're still interested in adding this program, we'll need to add some testing. Thanks for putting the docs together. |
Yeah sure. I was caught up with some important work so I couldn't do it. |
|
No worries! Just wanted to let you know that's why this solution is pending. |
I have added Josephus problem solution using recursion in Python
Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder!
For simplicity, please make sure that your pull request includes one and only one contribution.
Complete the Applicable Sections Below
Find which section best describes your pull request and make sure you fill it out. To start, let us know which issue you've fixed.
Code Snippets
Added/Updated <Sample Program> in <Language>formatTesting
Added/Updated <Language>/<Project> TestingformatNotes
Feel free to describe what you added or updated.