Anurag
I work in Microsoft and I have graduated from IIT Guwahati, major in Computer Science and Engg. I belong from noida (India).
I have more then 3 and 1/2 year work experienc in C/C++ domain for different product base companies.
- » Resume
I work in Microsoft and I have graduated from IIT Guwahati, major in Computer Science and Engg. I belong from noida (India).
I have more then 3 and 1/2 year work experienc in C/C++ domain for different product base companies.
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.
Hi,
- Anurag March 06, 2008This method definetly convert it into binary tree, but I think you are not taking account of information available like ID and parent_ID.
I think parent and child relation is already provided and you just need to link all these parents and child.
This could be done in these steps.
1. Take Id of object, find all node which has this ID as parent_ID
update parent_ptr of child node.
increment child count to 2.
and put these two nodes in parent child array
1.1 if parent_ptr of parent node also indicate to another parent
then increment child count of that object
and update child array
repeat step 1.1 till u find parent node which has parent_ptr as NULL.
This could be code easily with C.