Valeo interview question

Problem solving of some problems