3. Complexity of the Code Snippet Consider the following code snippet: int a = 1; while (a
Posted: Tue Jul 05, 2022 10:25 am
3. Complexity of the Code Snippet Consider the following code snippet: int a = 1; while (a <n) { a = a* 2; } What is the complexity of the above code snippet? Pick ONE option O(n) O(1) O(log2(n)) 060
Posted: Tue Jul 05, 2022 10:25 am
3. Complexity of the Code Snippet Consider the following code snippet: int a = 1; while (a <n) { a = a* 2; } What is the complexity of the above code snippet? Pick ONE option O(n) O(1) O(log2(n)) 060