Time Complexity - While Loop

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thank you so much for your videos they really helped me out

robot
Автор

Nice! So when a while is nested in a for loop. In the worst case its O(n²). Am i correct?

therustguy
Автор

BEGIN
a = 2
for i=0 to n
for j = 0 to i+1
a = i + j
END
What is the time complexity of given program?

john-fhun