run time error


  • 0
    J

    """from itertools import combinations
    class Solution(object):
    def twoSum(self, nums, target):
    """
    :type nums: List[int]
    :type target: int
    :rtype: List[int]
    """
    comb=combinations(range(len(nums)), 2)
    return [i for i in comb if nums[i[0]]+nums[i[1]]==target][0]"""


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.