ByteDance Interview Question

threesum question from leetcode, but they tweaked it a bit