What is the worst case computational complexity of the following code snippet in terms of Big O notation? int i 0, n = 5
Posted: Fri May 20, 2022 4:42 pm
What is the worst case computational complexity of the following code snippet in terms of Big O notation? int i 0, n = 5; if (i <n) print "less" else print "more or equal" O (n^2) (n squared) O 0(1) O O(nlogn) O O(n) O O(logn)