n - k + 1 is number of positions before we reach beginning of circle If m is less than this value , then we can simply return ( m - 1 ) th position
if ( m <= n - k + 1 ) : NEW_LINE return m + k - 1 NEW_LINE