Synopsys interview question

Big O notation and algorithm assessment.