Skip to content

Commit

Permalink
Fix dep
Browse files Browse the repository at this point in the history
  • Loading branch information
hikjik committed Feb 29, 2024
1 parent 3e8c598 commit 6f09a67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Space: O(1)
// Notes: [Morris Traversal](https://w.wiki/84dw)

class BSTIterator : std::iterator<std::input_iterator_tag, int> {
class BSTIterator {
public:
BSTIterator() : node(nullptr), curr(nullptr) {}

Expand Down
12 changes: 7 additions & 5 deletions solutions/check-if-two-string-arrays-are-equivalent/solution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ namespace flatten_iterator {

// Time: O(NK)
// Space: O(1)
template <typename OuterIterator>
class FlattenIterator
: public std::iterator<
std::input_iterator_tag,
typename OuterIterator::value_type::const_iterator::value_type> {
template <typename OuterIterator> class FlattenIterator {
public:
using value_type = OuterIterator::value_type::const_iterator::value_type;
using pointer = value_type *;
using reference = value_type &;
using iterator_category = std::input_iterator_tag;
using difference_type = std::ptrdiff_t;

FlattenIterator(OuterIterator first, OuterIterator last)
: first(first), last(last) {
if (first != last) {
Expand Down

0 comments on commit 6f09a67

Please sign in to comment.