leetcode
Ctrlk
  • Introduction
  • Topic summary
    • Backtracking
    • Dynamic programming
    • Binary search
    • Tree
    • DFS BFS
    • Union-Find & 2D matrix
    • Graph
    • Sliding Window
    • Sorting
    • Advanced algorithm
    • Data Structure
    • Bit Manipulation
    • Edge cases - input validation
    • String
    • Array
    • Stack
    • Heap
    • LinkedList
    • Greedy
    • design
    • Trie
  • System Design
  • Solutions
Powered by GitBook
On this page

Was this helpful?

  1. Topic summary

design

  • hasNext() next() can be called independently

  • for safety, call hasNext() before next()

  • cant store all data in advance

https://leetcode.com/problems/binary-search-tree-iterator https://leetcode.com/problems/flatten-nested-list-iterator https://leetcode.com/problems/peeking-iterator https://leetcode.com/problems/zigzag-iterator https://leetcode.com/problems/flatten-2d-vector https://leetcode.com/problems/design-compressed-string-iterator

PreviousGreedyNextTrie

Last updated 4 years ago

Was this helpful?