Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 319 Bytes

521.md

File metadata and controls

23 lines (14 loc) · 319 Bytes

521 Longest Uncommon Subsequence I

Description

link


Solution

  • See Code

Code

O(n) O(n)

class Solution:
    def findLUSlength(self, a: str, b: str) -> int:
        return -1 if a==b else max(len(a), len(b))