Nasdaq Interview Question

Easy Leetcode, basic algorithm questions