You are viewing a single comment's thread. Return to all comments →
Python Soluthon abusing index subsetting
def lonelyinteger(arr): arr2 = sorted(arr) idx = 0 while idx < len(arr2): print(idx) subset = arr2[idx+1:] if subset == []: return arr2[idx] elif arr2[idx] != arr2[idx+1]: return arr2[idx] idx += 2
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
Python Soluthon abusing index subsetting