problem
solution
1 | class Solution { |
1 | class Solution { |
1 | class Solution { |
analysis
- time complexity
O(n^3)
n is max length of substring ->O(n^2)
->O(n^2 logn)
- space complexity
O(1)
1 | class Solution { |
1 | class Solution { |
1 | class Solution { |
O(n^3)
n is max length of substring -> O(n^2)
-> O(n^2 logn)
O(1)