Mercari interview question

Asked me 3 sum on leetcode.