def threeSumSmaller(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        # https://leetcode.com/articles/3sum-smaller/#approach-2-binary-search-accepted
        nums.sort()
        ls = len(nums)
        res = 0
        for i in range(ls - 1):
            res += self.twoSumSmaller(nums, i + 1, target - nums[i])
        return res

        :type nums: List[int]
        :type target: int
        :rtype: int
        
python/259_3Sum_Smaller.py