ALL
Binary tree iterator algorithm
Binary tree pre-order,in-order and post-order traversal are basics in algorithm and data structure.And the recursive binary tree traversal is a classical application of recursion.We define a binary tree node as :// C++struct Node { int value; Node *left; Node *right;}In order binary tree traversal can be:// C++void inorder_traverse(Node *node) { if (NULL != node->left) { inorder_traverse(node->left); } do_something(node); if (NULL != node->right) { inorder_traverse(node->right); }}Easy enough, right? Pre-order and post-order traversal algorithm...
11,882 1 ITERATOR BINARY TREE TRAVERSAL
Difference between Enumeration and Iterator in java interview question and answer
This tutorial explains about what are the differences between Iterators and Enumeration and similarity of both interface which may be asked in a core java interview. Functionalities of both Iterator & Enumeration interfaces are similar that means both generates a series of all elements of the object which is to have its values iterated that can be traversed one at a time using next() method incase of Iterator and nextElement() method incase of Enumeration. The more powerful newer interface Iterator takes place of the old interface Enumeartion in the Java Collections Framew...
23,549 1 JAVA ITERATOR ENUMERATION