How to solve this problem in Linear time or less than O(n^2) ?

Revision en1, by _humblefool_, 2022-07-12 13:28:39

Problem link I did not find any better solution in the discuss section of leetcode that's why posting here.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English _humblefool_ 2022-07-12 13:28:39 236 Initial revision (published)