Time Complexity of if Statement #algorithm #daa #datastructures #datastructuresandalgorithms

preview_player
Показать описание
Time Complexity of if Statement

#algorithm #daa #algorithmanalysis #algorithmdesign #datastructures #datastructuresandalgorithms

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

so the f(n) = 1 + the highest cost either from the if statement if its true or the else part if the if statement is false ?

abdulmalekx
Автор

What if there are many if else if else if statements? Forexample there are n number of if else if conditions? Would that still be considered o(1) or o(n) ? I believe worst case will be o(n) right?

Khan_O
visit shbcf.ru