Time Complexity of if inside of for loop

前端 未结 0 1862
无人共我
无人共我 2021-01-28 13:43
for(int i = 0; i < Array.length ;i++)
{
  ...
 if(s[i]>s[m])
  {m = i;}
 }

What would the time complexity of this algorithm be? O(n)?

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