Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 348 Bytes

File metadata and controls

7 lines (4 loc) · 348 Bytes

Complexity Analysis:

  • Time Complexity: $O(n)$. $n$ is the length of input String.
  • Space Complexity: $O(1)$. We only use constant size of array. The input of sorting is constant as well. Thus, the total space complexity is $O(1)$.