Priyanka and Toys

  • + 0 comments
    def toys(w):
        # Write your code here
        w.sort()
        thr=w[0]
        count=1
        for i in range(len(w)):
            if w[i]>thr+4:
                thr=w[i]
                count+=1
        return count