Space complexity of recursion using queue as parameter

前端 未结 0 1657
再見小時候
再見小時候 2021-02-02 05:03

space complexity = depth * memory consumed. I have depth log(n) so in space complexity is O(NlogN). In one medium blog it says O(N). Therefore which is right?

cla         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题