Mercari Interview Question

Asked me 3 sum on leetcode.