1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
OA clue
Separate loops add; nested loops multiply; halving is logarithmic
N + N = 2N = O(N)
Separate loops:
N * N = O(N²)
Nested loops, same N:
N * 5 = O(N)
Nested loops, fixed inner loop length of 5:
N * M = O(N * M)
Nested loops, two different inputs:
O(log N)
Loop cuts problem in half:
N * N * N = O(N³)
Three nested loops over same N: