Is it possible to solve in O(n)? I have a python sorting solution which only beats 40%.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.