Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. // A is the input array.
  2. // |A| is the size of the input array.
  3. j = 1
  4. j = 1
  5. m = 0
  6. c = 0
  7. while < |A| {
  8. if A[i] == A[j]
  9. c = c + 1
  10. j = j + 1
  11.  
  12. if j > |A|
  13. if c > m
  14. m = c
  15. c = 0
  16. i = i + 1
  17. j = i
  18. }
  19. return m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement