← AlgorithmChallenge.com

Coding · Facts & stats

Algorithm facts & stats

7 fact-checked facts about algorithms, each with the reason behind it. 5 more are in today's round and join this page after it closes.

Play today's round

The basics

What is an algorithm?

AnswerA finite sequence of well-defined steps to solve a problem

An algorithm is a precise, step-by-step procedure that takes input and produces a result.

What does Big O notation describe?

AnswerHow running time or memory grows with input size

Big O notation expresses how an algorithm's cost scales as the input grows.

Going deeper

What is the time complexity of binary search on a sorted list?

AnswerO(log n)

Each step of binary search halves the remaining items, giving logarithmic time.

What is the worst-case time complexity of bubble sort?

AnswerO(n²)

Bubble sort may compare and swap neighbors across the list many times, giving quadratic time.

What does Dijkstra's algorithm find?

AnswerShortest paths in a graph with non-negative edge weights

Dijkstra's algorithm finds the shortest paths from a starting node when edge weights are not negative.

Expert level

Breadth-first search typically uses which data structure to track nodes to visit?

AnswerA queue

BFS visits nodes in order of distance using a first-in, first-out queue; depth-first search uses a stack.

What is the worst-case time complexity of quicksort?

AnswerO(n²)

Quicksort averages O(n log n), but consistently bad pivot choices degrade it to O(n²).

Know these cold?Today's round is five questions like these, 20 seconds each. Your streak and level follow you to every arena.Play today's round