Gainsight Interview Question

Program to count each repeating number in the given data. Double x= 12345123.121212