Skip to content

Instantly share code, notes, and snippets.

View jotasenator's full-sized avatar
👌
Learnig with you all

Maykel Contreras Camacho jotasenator

👌
Learnig with you all
View GitHub Profile
@wenweixu
wenweixu / ice_cream_parlor.py
Created September 2, 2019 18:32
Hackerrank Hash Tables - Ice Cream Parlor Python solution
def whatFlavors(cost, money):
cost_dict = {}
for i,icost in enumerate(cost):
if money-icost in cost_dict:
print(str(cost_dict[money-icost]+1) + ' ' + str(i+1))
return
else:
cost_dict[icost] = i