Lumen interview question

Problem solving question (tricky question)