hoanhan101 / algo

101+ coding interview problems in Go
https://hoanhan.co/posts/101-challenges
MIT License
3.54k stars 374 forks source link

Time/Space Complexity #6

Closed sabandi closed 3 years ago

sabandi commented 4 years ago

shouldn't it be be O(n!) instead of O(n) for Time/Space Complexity in https://github.com/hoanhan101/algo/blob/67a1c614cc0dca7d0b1fd1818c576fa8ac20f039/interviewcake/recursive_string_permutation_test.go#L25 ?

hoanhan101 commented 4 years ago

Can you elaborate? Why is it O(n!) again?