Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int MaxNum()
- {
- int max = 0;
- int temp = 0;
- var prev = Temp;
- var el = Temp;
- while (el != null)
- {
- if (el.Info == prev.Info)
- temp++;
- else
- {
- prev = el;
- temp = 1;
- }
- if (temp > max) max = temp;
- el = el.Prev;
- }
- return max;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement