489. Make all elements of Array Zero
Given a non-negative integer array nums, the task is to make all elements of the array equal to zero. In each operation, the following steps are performed: 1. Choose a positive integer x that is less than or equal to the smallest non-zero element in nums. 2. Subtract x from every positive element in nums. The goal is to determine the minimum number of operations required to make every element in nums equal to zero.
The first line contains an integer N, which represents the size of the array. The second line consists of N space-separated integers, which represent the elements of the array.
An integer representing the minimum number of operations required.
5 1 5 0 3 5
1 <= N <= 103