Skip to main content

Big-Theta

Learn Big-Theta (Complexity, Programming Fundamentals) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

What is Big-Theta (Θ)? Big-Theta notation describes a tight bound — it applies when the best case and worst case grow at the same rate . In that situation, Big-O (upper bound) and Big-Omega (lower bound) meet, and Theta gives the single, precise growth rate. • Written as Θ(f(n)) . • If an algorithm is Θ(n), it means it ALWAYS does work proportional to n — never faster, never slower, regardless of the specific input. • Theta is the most informative notation when it applies, because it pins down behavior exactly instead of just bounding it from one side.

More lessons in Complexity