TIME COMPLEXITY

Worst Case:

Average Case:

Best Case:

SPACE COMPLEXITY

Worst Case: