Shopee interview question

3 Sum question from leet code.