类别归档:LeetCode

LeetCode OJ is a platform for preparing technical coding interviews.

RSS feed of LeetCode

[LeetCode]Peeking Iterator

题目描述:

Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation -- it essentially peek() at the element that will be returned by the next call to next().

Here is an ...

继续阅读