Solutions for Add up to make equal

    • @Geraldpof
    • @Charles, submitted in Python 3, achived 100% score
    def solve(arr, sum):
        arr_size=len(arr)
        # Create an empty hash set
        s = set()
        ls=[]
        for i in range(0, arr_size):
            temp = sum-arr[i]
            if (temp in s):
                ls=[arr[i],temp]    
            s.add(arr[i])
        return ls