Dontnod interview question

First problem on binary search Second on array rest mcq