You are viewing a single comment's thread. Return to all comments →
You can do it in O(n)
def hs(num): total = 0 for i in range(num, 0, -1): total += i-1 return total
Am I right?
Seems like cookies are disabled on this browser, please enable them to open this website
Handshake
You are viewing a single comment's thread. Return to all comments →
You can do it in O(n)
Am I right?