From a96b65cbfad7f62f3db6b2eab105e4e25c0414c5 Mon Sep 17 00:00:00 2001 From: Jack Sangdahl Date: Fri, 27 Jun 2025 12:23:02 -0600 Subject: chore: remove old cpp and rust solutions --- other/peeking_iterator.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 other/peeking_iterator.cpp (limited to 'other/peeking_iterator.cpp') diff --git a/other/peeking_iterator.cpp b/other/peeking_iterator.cpp deleted file mode 100644 index 1c4d0b9..0000000 --- a/other/peeking_iterator.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "leetcode.h" - -class Iterator { - struct Data; - Data *data; - -public: - Iterator(const vector &nums); - Iterator(const Iterator &iter); - int next(); - bool hasNext() const; -}; - -class PeekingIterator : public Iterator { -public: - int nextVal; - PeekingIterator(const vector &nums) : Iterator(nums) { - nextVal = Iterator::next(); - } - int peek() { return nextVal; } - int next() { - int tmp = nextVal; - if (Iterator::hasNext()) - nextVal = Iterator::next(); - else - nextVal = NULL; - return tmp; - } - bool hasNext() const { return (nextVal != NULL); } -}; - -int main() {} -- cgit v1.2.3