LeetCode
Peeking Iterator
Click
here
for an explanation.