Xon
Am passionate about technology
Am passionate about technology
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
A sample Pseudocode :
- Xon November 12, 2007There will be three functions:
traverseTree(TREE tnode, LINK lnode);
main();
processNodes(TREE tnode, LINK lnode);
main()
{
allocate link_node;
declare link_head AS link_node;
declare tree_node AS tree_root;
traverseTree(tree_node,link_node);
link_node = null;
display(link_head);
}
traverseTree( TREE tnode, LINK lnode)
{
if (tnode == null)
{
return;
}
else
{
traverseTree (tnode->left, lnode)
processNodes (tnode,lnode)
traverseTree (tnode->right, lnode)
}
}
processNodes( TREE tn, LINK ln)
{
ln->value = tn->value;
allocate a new link node newLinkNode;
ln->next = newLinkNode;
ln = ln->next;
}
That's it. The code assumes that every tree node has a left and right pointer and the link list is singly listed. If it is to be made a doubly listed one, then altering the processNodes function alone does the trick.
display is a generic function that iterates through the link list and displays its value.