Valeo Interview Question

mostly on c++ coding and mathematical logics