about | help | code help+videos | done | prefs |
Given a number of people "n", and a skip number "s", return the final TWO SPOTS that will be surviving if they play the Josephus elimination game. You will need to create an integer array of size 2 for the answer. Index 0 should contain the FINAL SPOT where you should stand and Index 1 should contain the SECOND TO LAST SPOT ELIMINATED where your best friend should stand! array_josephusBonus(2, 2) → [1, 2] array_josephusBonus(3, 2) → [3, 1] array_josephusBonus(4, 2) → [1, 3] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy