You are viewing a single comment's thread. Return to all comments →
def sockMerchant(n, ar): m = [0] * 100 for e in ar: m[e-1] = m[e-1]+1 s = 0 for e in m: s = e // 2 + s return s
def sockMerchant(n, ar): m = [0] * 100
for e in ar: m[e-1] = m[e-1]+1 s = 0 for e in m: s = e // 2 + s return s
o(n)
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →
o(n)