Loading, please wait...

Complexity

Algorithm

Best time Complexity

Average time complexity

Worst time complexity

Worst space complexity

Linear Search

O(1)

O(n)

O(n)

O(1)

Binary Search

O(1)

O(logn)

O(logn)

O(1)

Indexed Sequential Search

O(1)

O(n)

O(n)

O(1)

Breadth First Search

O(|E|+|V|)

O(|E|+|V|)

O(|E|+|V|)

O(|V|)

Depth First Search

O(|E|+|V|)

O(|E|+|V|)

O(|E|+|V|)

O(|V|)

Interpolation Search

O(log(logn))

O(log(logn))

O(log(logn))

O(nlogn)