size of the array:

speed of the algorithm:

Time Complexity

Worst case:

Average case:

Best case:

SPACE COMPLEXITY

Worst case: