Priyanka and Toys

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