LinkedIn Interview Question

2 Leetcode problems - one easy and one easy