Qualcomm interview question

Calculate complexity of algorithms?