Frequency Of Limited Range Array Elements

easy
1. You will be given an Array and its length, n. 2. The given array can either contain a number from 1 to n or not. 2. You need to find the frequency of numbers 1 to n in the given array. 4. Input is handled for you 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you.

Output Format

Print frequency of numbers 1 to n in the given array

Constraints

1<= n <= 106 
 1 <= A[i] <= 106

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
6
3 4 5 6 1 1
Output
2 0 1 1 1 1
Previous
First Unique Character In A String
Next
Smaller On Left

Related Questions