You are viewing a single comment's thread. Return to all comments →
python3
def toys(w): # Write your code here count = 1 w = sorted(w) curr = w[0] for i in w: if abs(i - curr) > 4: count += 1 curr = i return count
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Priyanka and Toys
You are viewing a single comment's thread. Return to all comments →
python3