Question:Here is a code for an integer variable n while (n > 0) { n = n/10; // Use integer division } What is the worst case scenario analysis for the above loop? 

A O(1) 

B O(log n) 

C O(n) 

D O(n2) 

+ Answer
+ Report
Total Preview: 1659

Copyright © 2024. Powered by Intellect Software Ltd