ActionIQ interview question

1 leetcode easy for first round and 1 leetcode medium for second round