NPTEL Introduction to Programming in C Assignment 4 Question 2
Find the number of distinct numbers in a given sequence. The sequence need not be sorted.
The input consists of two lines. The first line consists of a positive number N. N is at most 1000. The second line consists of N numbers separated by spaces.
The output should be the number of distinct elements in the sequence.
4
1 2 3 1
3
4
33 66 77 66
3
7
0 0 0 0 0 0 0
1
5
1 2 3 4 -5
5