Design iterator that supports peek() operation.
Sample Input:
["PeekingIterator","next","peek","next","next","hasNext"], [[[1,2,3]],[],[],[],[]]
Sample Output:
[null,1,2,2,true]
Hints
Hint 1
Cache next element for peek operation
Hint 2
Update cache when next() is called
Hint 3
Handle end of iterator case