Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned check(int *Items, int Count)
- {
- int max = 0, start = 0, end = 0;
- while(Count--)
- {
- if (Items[Count] > max)
- {
- max = Items[Count];
- start = end = Count;
- }
- else if (Items[Count] == max)
- {
- end = Count;
- }
- }
- return start == end ? 0 : (start - end - 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement