Fragen im Vorstellungsgespräch bei Nokia: What are the different method... |

Frage im Vorstellungsgespräch

Software Development Engineer-Vorstellungsgespräch(Studentischer Bewerber) Bengaluru (Indien)

What are the different methods to search a binary tree

 ? Some applications of each of them...

Antwort im Vorstellungsgespräch

2 Antworten


DFS , BFS, ...etc..
Applications : Artificial Intelligence...etc

Bewerber im Vorstellungsgespräch am 17.06.2012

The above answer is Wrong!
The initial question also looks weird - search binary tree? Perhaps traverse a binary tree.

BFS and DFS are "graph" traversing methods. Since trees are also graphs the algorithms can be applied in this case too... but the correct answer is:

Preorder (root+left+right)
Inorder (left+root+right)
Postorder (left+right+root)
Some say even "Level traversing of a binary tree"

Listing the folder and files recursively etc.
Evaluation a math expression tree
Binary search tree

Anonymous am 04.09.2013

Antwort oder Kommentar posten

Um dies zu kommentieren, bitte anmelden oder Konto anlegen.