Advertisement
Arbitrator

Untitled

Jan 9th, 2020
11,547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. What is the value of the variable "count", as a function of "n", after running the following code fragment?
  2. What is the order of growth? Justify your answer. Formal proof is not necessary. You can be as creative as you want to "show" your conclusion.
  3. int count = 0;
  4. for (int i = 0; i < n; i++)
  5. for (int j = i+1; j < n; j++)
  6. for (int k = j+1; k < n; k++)
  7. count++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement