Complexity analysis & Big-O
The block that decides whether you pass. Analyse loops, apply the master theorem, tell O, Θ and Ω apart.
- Big-O
- master theorem
- recurrences
- best/worst case
- amortised
ALGORITHMS & DATA STRUCTURES · EXAM · 1:1
Four to five sessions before the exam. We practise Big-O on real tasks, work through trees, heaps and graphs, and drill the routine you use to derive any running time cleanly.
Dennis LIVE Senior Java Engineer · Algorithms responds ≤ 2 h , View profile Free first chat →
Already decided? Straight to a session →
Live from an A&DS session
// What is the running time of this loop? for (int i = 1; i < n; i = i * 2) { System.out.println("step"); } // i doubles: O(log n), not O(n)
The weighting varies by university, but the structure is remarkably stable: an analysis block (running time, Big-O), a data-structures block (trees, heaps, hashing) and an algorithms block (sorting, graphs). We drill each type on your past papers.
Pay per session or grab an exam package. The intro call is free: if it is not a fit, you have lost nothing.
No memorised formula. We derive the running time line by line, the way you have to justify it in the exam.
Determine the running time of the function in terms of n in Big-O notation. Justify your answer.
void f(int n) { for (int i = 0; i < n; i++) { for (int j = 1; j < n; j = j * 2) { System.out.println(i + "," + j); } } }
The answer is O(n log n): the outer loop runs n times, the inner loop doubles up to log n times, and nested loops multiply.
j starts at 1 and doubles each pass until j ≥ n. That is log₂(n) steps, so O(log n).
i runs from 0 to n, that is n passes, so O(n). The loops are nested.
Nested loops multiply their running times: O(n) · O(log n) = O(n log n). That is the answer.
Nested loops multiply their running times. Count each loop on its own, then combine the O terms.
That is exactly what we practise in your session: deriving a running time cleanly instead of guessing.
Start now and invest 4 to 5 sessions and your chances are good. Less time? We compress. More? We go deeper, into custom data structures or NP-completeness.
You share your screen, we go through your latest exercise and exam scope. We see where you really stand, not where you think you do.
We drill the analysis block: loops, recurrences, the master theorem. You derive, I probe, until the routine sticks.
Insert and delete in trees, heaps and hash tables, then execute sorting and graph procedures step by step, on your actual exam material.
You solve your university's mock exam against the clock. We review every task: what is solid, where you get stuck and which task types are likely to come up.
I built Study IT because I have seen first-hand how IT teaching at university falls apart.
The people who teach here know code from real projects. Practice decides, not the diploma.
Reach me directly: marcel.schmidtpeter@study-it.education
Senior Java Software Engineer with 11 years of industry experience. He explains Big-O, trees, heaps and graph algorithms step by step, with the routine that holds up under exam pressure.
„Programmieren versteht man, wenn man weiß, warum eine Lösung funktioniert. Mein Ziel: dass du Code nicht abschreibst, sondern selbst hinkriegst."
If A&DS is not your bottleneck, one of these pages probably fits better.
Free intro call, 30 minutes. We look at your material and tell you honestly how many sessions you need.