Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int? this[int start, int end]
- {
- get
- {
- Node tmp = head;
- int? min = null;
- int begin = 0;
- while (tmp != null && end >= begin)
- {
- if (begin++ >= start)
- {
- min = min ?? tmp.data;
- min = min > tmp.data ? tmp.data : min;
- }
- tmp = tmp.next;
- }
- return min;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement