Intel Corporation interview question

Leetcode questions, three in total