Meta Interview Question

two leetcode mediums for 45 minutes