Opening the reading…
Opening the reading…
TIME AND SPACE COMPLEXITY / ONLINE JUDGE › TIME AND SPACE COMPLEXITY
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Using the array [7, 2, 9, 1, 5, 8, 3, 6], compute the step counts for 100 * n and n^2 at n = 8. Print the routine that performs fewer steps.
OUTPUT
Samplen = 8 100 * n: 800 n^2: 64 Fewer steps: n^2
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.