Iterator와 Sequence
HeshAlgo
1. Iterator?- Collection에 저장된 요소들을 순차적 처리 하기 위해 사용합니다. (Eager 처리) - 해당 Iterator 인터페이스는 아래와 같은 구조를 가지고 있습니다. public interface Iterator { /** * Returns the next element in the iteration. */ public operator fun next(): T /** * Returns `true` if the iteration has more elements. */ public operator fun hasNext(): Boolean } Iterator는 저장된 요소들을 순차적으로 접근하기 때문에 특정 인덱스에 바로 접근하지 못한다는 특징이 있습니다. 그렇기 때문에 3번째 요소..