Rabbits In The Forest
1. There are some rabbits in the forest and each rabbit has some color. 2. Some(possibly all) rabbits are selected from them and they tell you about the number of other rabbits having the same color as them. 3. You are given an array(arr) that contains the answers of all selected rabbits. 4. You have to find the minimum number of rabbits that could be in the forest.
1 <= N <= 1000 0 <= arr[i] <= 1000
A number N arr1 arr2.. N numbers
A number representing the minimum number of rabbits in the forest.
5 1 0 1 0 0