Algorithm Interview Report
- 0of 0 votes
Answersyou have a file with words , and we need to select top N repeated words in this file.
- Dr.H October 14, 2012 in United States for SQL Server / DPG Group
challenge Imagine this file is TB file that can't fit in memory what will you do?| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
Answersyou have a table of 2 columns , describe task scheduler, tasks can't run unless other tasks it depends
- Dr.H October 14, 2012 in United States for SQL Server / DPG Group
on finished running
Task | Depend
-----------------------
A | B
B | C
C | D
and so on ..
from that table design an algorithm that output the task workflow execution in sequence.
A->B->C->D
it can be repeated , there can be loop cycle .
design an algorithm that output this in O(n) , space is not an issue.
anyway it was very though question you need to ask as many question as you know .
after this hard time , the solution will use a graph to represent the relation first
then you will traverse the graph to output the workflow.
in the final you need to have a knowledge of Topological Sort to be able to solve it.
so if you will not depend on luck try to study graph and graph algorithms very hard before you go .| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
Answers-write an algorithm to tell if the tree is balanced ?
- Dr.H October 14, 2012 in United States for SQL Server / DPG Group
-what is the mathematics rule that can help us to define this? O(log(h)) , how to use this model in your algorithm
- what types of Balanced Tree ? Red-Black Tree.
write an algorithm to balance a tree ? and also to Auto balance a tree while you are inserting the nodes.| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
Answersyou have Trie tree , not ordered , juts don't worry about the order.
- Dr.H October 14, 2012 in United States for SQL Server / DPG Group
write an efficient algorithm to Serialize and DeSerialize
the tree , in the same order , you need to construct the same tree.
what if the tree have millions of node ? optimize everything| Report Duplicate | Flag | PURGE
Algorithm