Here is a part of a table consisting of the best, average, and worst cases for different abstract algorithms. Find algorithms that can't be true in any way.
Number of an algorithm | Best case | Average case | Worst case |
|---|
1 | O(1) | O(n2) | O(n⋅logn) |
|---|
2 | O(n⋅logn) | O(n) | O(n⋅logn) |
|---|
3 | O(n2) | O(n2) | O(n2) |
|---|
4 | O(n) | O(1) | O(n2) |
|---|
5 | O(n⋅logn) | O(n⋅logn) | O(∞) |
|---|
Hint: recall the hierarchy/order of complexities: O(1)<O(n)<O(n⋅logn)<O(n2)<O(∞). Keep in mind that the task is to find the algorithms which deviate from this order.