End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
left to store the first occurrence index, right to store the last occurrence index, and count to store the frequency of each element.left, right, and count for each element.count.count that have a frequency equal to the degree.