Design an iterator that supports the peek operation.
Sample Input:
[["PeekingIterator","next","peek","next","next","hasNext"], [[[1,2,3]],[],[],[],[],[]]
Sample Output:
[null,1,1,2,3,false]
Hints
Hint 1
Cache the next element to support peek
Hint 2
When peek is called, return cached element without consuming it
Hint 3
When next is called, return cached element and fetch the next one