Ladders interview question

Do you understand big O notation? Talk to me about performance in this code segment.