GlobalLogic Interview Question

Name and elaborate algorithm complexities