+ 1
I'm confused on lists
i don't understand how you find out how many times a number repeats in a list. please help.
1 Answer
0
I will try not to give you the classical algorithm, but rather an outline, so you can code it yourself.
How do you count the number of occurrences in a list ? You go through all the list and if the item you are looking at is identical or (just) equal to the one you want, increment the count.
That's it. Have a go