【Leetcode】259. 3Sum Smaller

題目地址: https://leetcode.com/problems/3sum-smaller/html 給定一個整數數組,再給定一個數target,問這個數組裏有多少個triplet之和小於target。java 思路是排序 + 對撞雙指針。能夠參考https://blog.csdn.net/qq_46105170/article/details/105898471。代碼以下:web impo
相關文章
相關標籤/搜索