← 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

Binary search only works on a list that is what?

AnswerSorted

Binary search halves the search range each step, which requires the items to be in sorted order.

What is a recursive function?

AnswerA function that calls itself

A recursive function solves a problem by calling itself on smaller versions of the same problem.

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

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

AnswerO(n log n)

Merge sort splits the list in half repeatedly and merges in linear time, always giving O(n log n).

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