Situation:
T [M] an array sorts in ascending order. Write an algorithm that calculates the number of occurrences of an integer x in the