Mianto / iterator-pattern-in-tree

Implementing the iterator pattern in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binary Tree implemented using Iterator pattern

Iterator Pattern is a design pattern in which an iterator is used to traverse a container and access the container's elements, without knowing it's inner implementations.

Using the design pattern, following traversal have been implemented

  • Preorder traversal
  • Inorder traversal
  • Postorder traversal
  • Breadth First traversal