I have an array of approximately 80 000 numbers, and I'd like to know how many consecutive numbers of each type there are, and if that number is less than 10000 make those values the same as the previous integer.
For example on a smaller scale when any integer appeared less than 5 times it became the same as the previous value:
8 8 8 8 8 7 7 7 7 7 6 6 6
Would become
8 8 8 8 8 7 7 7 7 7 7 7 7
both 8 and 7 appear 5 times in the original list so would remain unchanged, but 6 only appears 3 times so it becomes 7 for all 3 values.
Many thanks
Best Answer