I used modulo and only beat 14%. So I am wondered
I think the running time depends on the performance of the server. Doesn't mean your algorithm is slow.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.