Algorithm analysis checker: count the steps, Big O, Big Omega and Big Theta
Free time complexity checker. Count how many times each line of an algorithm runs, add it up, and give Big O, Big Omega and Big Theta. Graded out of 100, with the first line you got wrong.
Count every step
Pick an algorithm or write your own in pseudocode: FOR loops (with step), WHILE loops, IF, ELSE IF and ELSE, AND, OR and NOT. Write how many times each part runs as a formula in n, like n + 1, n(n+1)/2 or ⌊log₂ n⌋ + 1. The checker runs the algorithm for every n from 1 to 40 and grades each line.
Big O, Big Omega and Big Theta
Add up the worst case for Big O and the best case for Big Omega. When they grow differently, as in linear search or insertion sort, Big Theta comes from the average case. You get a score out of 100, the first line you got wrong, and the full answer.
Step by step, and new algorithms
Press How did we get this answer? to see the count built one line at a time, in the same style as the course. With a free account you also get new algorithms to practise on, from easy single loops to sorting and searching.