How can this solution with a for-loop inside a while loop have a time-complexity that is not O(n^2)

后端 未结 0 1879
名媛妹妹
名媛妹妹 2020-12-21 08:39

Can someone explain to me why Cracking the Coding Interview says that this algorithm has a time complexity of O(P + D)? Is it not O(n^2)?

public stat         


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