The best Java solution is over 100ms. On the other side, the best of Python is about 50ms. I can't beleive it!
I think the idea behind thoes solutions are the same. So Why?!
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.