Shopee interview question

Leetcode easy involving arrays, and one medium question involving recursion and data structures