What's the complexity of for i: for o = i+1

前端 未结 4 1303
难免孤独
难免孤独 2020-12-22 06:52
for i = 0 to size(arr)
   for o = i + 1 to size(arr)
      do stuff here

What\'s the worst-time complexity of this? It\'s not N^2, because the seco

4条回答
提交回复
热议问题