|
interview_questions
|
|
|
|
|
Bookmarks
|
|
|
|
|
|
|
|
|
|
Save Link
Create/Add to List
|
|
|
|
|
|
This was asked in one of the Amazon phone screening.
You have a General n-ary tree of k levels. There are total of N nodes in the tree.
How will you design an algorithm, which will save the tree to a file and reconstruct the whole tree from the saved file later?
Design an algorithm which require
1. Least amount of CPU time.
2. Least amount of file space.
For an N node tree what’s the minimum and maximum file space required?.
Please make necessary assumptions.
http://linkmingle.com/details/533
created by interview_questions on 2008-05-08 08:56:43
|
|
Algorithm: You have a tree (not Binary) and you want to print the values of all the nodes in this tree level by level. Discussed on phone and asked me to email Java code for my algorithm. [18 ]
http://www.careercup.com/show/?co=8cfeaaf4-d500-4e
created by interview_questions on 2008-05-08 04:34:26
|
|
|