problem
solution
option 1 - native
1 | class Solution { |
option 2
因為每個子陣列元素唯一
1 | class Solution { |
analysis
- option 1
- time complexity
O(nmm)
- space complexity
O(1)
- time complexity
- option 2
- time complexity
O(10000n)
- space complexity
O(10000)
- time complexity