Skip to content

Added Josephus Problem in Every Language Article#331

Merged
jrg94 merged 10 commits intoTheRenegadeCoder:masterfrom
AakashBelide:master
Oct 7, 2020
Merged

Added Josephus Problem in Every Language Article#331
jrg94 merged 10 commits intoTheRenegadeCoder:masterfrom
AakashBelide:master

Conversation

@AakashBelide
Copy link
Contributor

@AakashBelide AakashBelide commented Oct 3, 2020

This is in reference to the enhancement for PR in TheRenegadeCoder/sample-programs#1933

This is in reference to the enhancement for PR #1933 in TheRenegadeCoder/sample-programs
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, really nice work! Just a couple minor changes.

@jrg94 jrg94 self-assigned this Oct 6, 2020
@jrg94 jrg94 added the project Project documentation label Oct 6, 2020
@jrg94 jrg94 changed the title Added Josephus Problem article index.md Added Josephus Problem in Every Language Article Oct 6, 2020
AakashBelide and others added 5 commits October 6, 2020 21:37
Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I think we can update the dates and we'll be good to go.

@jrg94
Copy link
Member

jrg94 commented Oct 6, 2020

Actually, when you say "index", do you mean starting from 1 or starting from 0? That should probably be documented in here.

AakashBelide and others added 2 commits October 6, 2020 22:17
Updated date

Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
Updated date

Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
@AakashBelide
Copy link
Contributor Author

Actually, when you say "index", do you mean starting from 1 or starting from 0? That should probably be documented in here.

It's starting from 0. Here is a demonstartion of how it works:
(Input: 5(total number of people in circle, 2 (number of people to skip -1)
Output: (Number of people in the circle currently, number of people to skip, index of the person to be killed or removed)
[1, 2, 3, 4, 5] 1 0
[1, 3, 4, 5] 1 1
[1, 3, 5] 1 2
[3, 5] 1 0
3
Hence, the 3rd person remains alive at the end.
Should I add this as an example and mention it in the description of index.md?

@jrg94
Copy link
Member

jrg94 commented Oct 6, 2020

Is there any way you could add this example to the description? I think it would help a lot!

@AakashBelide
Copy link
Contributor Author

Is there any way you could add this example to the description? I think it would help a lot!

Shall I add it as an example in the description or shall I make a new example sub heading and add under it?

@jrg94
Copy link
Member

jrg94 commented Oct 6, 2020

Good question! I think we usually put examples as a sub heading under Description. See Bubble Sort: https://sample-programs.therenegadecoder.com/projects/bubble-sort/

@AakashBelide
Copy link
Contributor Author

Good question! I think we usually put examples as a sub heading under Description. See Bubble Sort: https://sample-programs.therenegadecoder.com/projects/bubble-sort/

I have added an example. Kindly check it and let me know if there are any more changes to be made.

Copy link
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just a quick fix and we're ready to go

Co-authored-by: Jeremy Grifski <jeremy.grifski@gmail.com>
@AakashBelide
Copy link
Contributor Author

Looks great! Just a quick fix and we're ready to go

Great!!

@jrg94 jrg94 merged commit a7ab2d9 into TheRenegadeCoder:master Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project Project documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants