Closed zhangru-ng closed 8 years ago
Start maybe greater than end. Even start is smaller, it may lead for more than one circle.
Use leftEnd and rightEnd to specify open/closed interval, compare start and end at the beginning, if start > end, use different strategy.
Start equal to end means the interval cover the whole ring.
Start maybe greater than end. Even start is smaller, it may lead for more than one circle.