Solved

The Code Segment Below Displays a Pattern of Asterisks

Question 12

Multiple Choice

The code segment below displays a pattern of asterisks.Select an expression to complete the code segment so that the resulting algorithm has O(n) running time. The code segment below displays a pattern of asterisks.Select an expression to complete the code segment so that the resulting algorithm has O(n)  running time.    A) (int j = n; j > 0; j = j / 2)  B) (int j = 1; j <= 10; j++)  C) (int j = 1; j < k; j++)  D) (int j = n; j > 0; j--)


A) (int j = n; j > 0; j = j / 2)
B) (int j = 1; j <= 10; j++)
C) (int j = 1; j < k; j++)
D) (int j = n; j > 0; j--)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions