Shopee Interview Question

3 Sum question from leet code.