JPMorganChase interview question

Easy leetcode questions. Focus on algorithm