You are viewing a single comment's thread. Return to all comments →
Basically Two Sum
def icecreamParlor(m, arr): d = dict() for idx, price in enumerate(arr): if m - price in d: return [d[m - price], idx + 1] d[price] = idx + 1 return [0,0]
Seems like cookies are disabled on this browser, please enable them to open this website
Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
Basically Two Sum