Qualcomm Interview Question

Calculate complexity of algorithms?