Search results for traversal



Answer Binary search tree (BST) is a binary tree which has the following properties: 1. Tree is a binary tree 2. The left subtree of a node conta ...
Company where asked this question: Amazon
Interviewed for position: SDE, SDET
Answer: Hash tables (hash maps) - is amortized constant-time access data structures that map keys to values. Binary Trees - is a tree data structur ...
How would you implement Iterator Pattern for traversing Binary Tree (in any order of your choice)? So, the following would give an example of using s ...
Company where asked this question: Amazon (Seattle)
Another very common variation is how to store a tree data structure in a database. Be prepared to answer this question even if you are applying for U ...
Question is usually something like explain BST or Binary Search Tree.   Answer:   A binary search tree (BST) is a tree in which every node's ...
Task:“Compute the sum of all the values in the nodes of a single linked list”   The only thing is needed to solve this problem is linked list tr ...
“Write functions Insert and Remove which add and remove nodes from ordered single linked list based on the Node value”   Operations of insertion ...
Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk a collection ...