Data structure


An AVL tree is another self-balanced binary search tree. The heights of the two child subtrees of any node differ by at most one; otherwise, rebalancing is done to restore this property. The AVL tree maintains an extra attribute in each node to balance the height.

Depth First Search algorithm is an algorithm to search node from tree or graph. DFS algorithm starts traversing from the root. It traverses each branch before backtracking. DFS takes less memory compared than Breadth first search and not necessary to store all of the child pointers at each level.

Breadth First Search is an algorithm for searching the nodes in tree or graph data structures. It starts from the root node and explores the neighbor nodes first, before moving to the next level neighbors. If the solution is not far from the root, we can choose breadth-first search solution. If the solutions are far, it takes a lot of time to find the solution.

A graph data structure consists of a finite (and possibly mutable) set of nodes or vertices. A graph may be either undirected or directedGraph supports add, delete, neighbors, adjacent operations.

Infix and postfix are the notations to write the expressions. The infix notation put operators in between the operands. The postfix notation put operators after their operands. Write a program convert from infix notation to postfix notation.