Ice Cream Parlor

  • + 0 comments

    Compact Python solution:

    def icecreamParlor(m, arr):
    
    for i_1,a in enumerate(arr):
    
        for i_2,b in enumerate(arr):
    
            if i_2>i_1:
                if m-arr[i_1]==arr[i_2]:
                    return [i_1+1,i_2+1]