We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Save the Prisoner!
Save the Prisoner!
Sort by
recency
|
1713 Discussions
|
Please Login in order to post a comment
int result = (s + m -1) % n; if(result == 0){ return n; }else{ return result; } }
clean Rust:
Here is problem solution in Python, java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-save-the-prisoner-problem-solution.html
My Javascript solution:
function saveThePrisoner(n, m, s) {
}