Im having problems creating a function that checks how many times a number shows up in the array
The array is already sorted
im trying to loop through the array and theres be a counter to keep track of the number of times it appears and then a second array called trackerArray to place the value of that counter in correspondence to the value in the first array.
for(i=0; i < SIZE;i++){
if(array[i]==array[current]){
count++;
}
else if (array[i]> array[current]){
trackerArray[i]=count;
count=0;
current++;
}
}
the trackerArray is still filled with zeros after this... what went wrong?