0
The saveThePrisoner function will save the prisoner at index n with value s + m - 1.
0 Comments
function saveThePrisoner(n, m, s) { let value = s + m - 1; return (value > n) ? (!(value % n) ? n : value % n) : value; }