CodePudding user response:
With bubble sort method should be able to solve, just use a while loop instead of a for loop,CodePudding user response:
First to sort an array, then can keep index array, see an index and on whether a value equal to the number equal to the most timesCodePudding user response:
Or you can iterate through group, every time a number of create a key/value pair, record Numbers and quantity