+ 1
input is 1,1,1,3,3,4,4,5,6,6,6,6,9 and output : no of 1-3 no of 3-2 no of 4-2 no of 5-1 no of 6-4 no of 9-1 what is the logic for above
2 odpowiedzi
0
It simply displays a number paired along with the respective no. of instances in the input. It's logic an be implemented using a simple for loop.