Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // A is the input array.
- // |A| is the size of the input array.
- j = 1
- j = 1
- m = 0
- c = 0
- while < |A| {
- if A[i] == A[j]
- c = c + 1
- j = j + 1
- if j > |A|
- if c > m
- m = c
- c = 0
- i = i + 1
- j = i
- }
- return m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement