You are viewing a single comment's thread. Return to all comments →
java 8 O(1) : return ((s+m-1)%n >0)?(s+m-1)%n:(s+m-1)%n +n ;
Seems like cookies are disabled on this browser, please enable them to open this website
Save the Prisoner!
You are viewing a single comment's thread. Return to all comments →
java 8 O(1) : return ((s+m-1)%n >0)?(s+m-1)%n:(s+m-1)%n +n ;