What is the worst case computational complexity of the following code snippet in terms of Big O notation? int i 0, n = 5
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
What is the worst case computational complexity of the following code snippet in terms of Big O notation? int i 0, n = 5
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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!