- 3 Complexity Of The Code Snippet Consider The Following Code Snippet Int A 1 While A N A A 2 What Is The 1 (36.63 KiB) Viewed 10 times
3. Complexity of the Code Snippet Consider the following code snippet: int a = 1; while (a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. Complexity of the Code Snippet Consider the following code snippet: int a = 1; while (a
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