Patlytics interview question

Two sums on leetcode, and doing it in a google doc