[algogeeks] Finding pre order representation of expression
From the following options, select the correct pre-order representation of the following expression. – 16 – – 14 / – 12 - 2 * 8 Please do answer how you arrived at the answer! Answers -–16--/14–12*28 -–16--/-1412*28 -–16-/–14–12*28 */--–16-14–1228 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Binary Search Tree Question
What does this function do? void function(Node **node){ if(*node!=NULL){ function((*node)-Left); Node *temp; temp = (*node)-Left; (*node)-Left= (*node)-Right; (*node)-Right = temp; function((*node)-Right); } } -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Binary Search Tree Question
Thanks! I knew that it wont reverse the tree but was not sure about how it reversed just the root. On Feb 9, 7:57 pm, Don dondod...@gmail.com wrote: It appears to be an attempt to reverse the tree. However, there is a problem. It reverses the left sub-tree, then swaps the left and right sub-trees. Then it reverses the right sub-tree. But wait! The original left sub-tree which we reversed is now the right sub-tree, so we actually unreversed it. And the left sub-tree has never been reversed at all. So I don't think that it will work. The actual result will be that left and right will be swapped in the root node. Beyond that, there will be no change. To make it work as intended, either do the two recursive calls one after the other, or change the second one from Right to Left. Don On Feb 9, 8:38 am, Rahul Menon menonrahul1...@gmail.com wrote: What does this function do? void function(Node **node){ if(*node!=NULL){ function((*node)-Left); Node *temp; temp = (*node)-Left; (*node)-Left= (*node)-Right; (*node)-Right = temp; function((*node)-Right); } }- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Binary Search Tree Question
How come it just reversed the root? I still dont get it! Rahul On Feb 9, 7:57 pm, Don dondod...@gmail.com wrote: It appears to be an attempt to reverse the tree. However, there is a problem. It reverses the left sub-tree, then swaps the left and right sub-trees. Then it reverses the right sub-tree. But wait! The original left sub-tree which we reversed is now the right sub-tree, so we actually unreversed it. And the left sub-tree has never been reversed at all. So I don't think that it will work. The actual result will be that left and right will be swapped in the root node. Beyond that, there will be no change. To make it work as intended, either do the two recursive calls one after the other, or change the second one from Right to Left. Don On Feb 9, 8:38 am, Rahul Menon menonrahul1...@gmail.com wrote: What does this function do? void function(Node **node){ if(*node!=NULL){ function((*node)-Left); Node *temp; temp = (*node)-Left; (*node)-Left= (*node)-Right; (*node)-Right = temp; function((*node)-Right); } }- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Binary Search Tree Question
What about just the root being reversed? Why is it different only in case of root? Rahul On Feb 9, 10:52 pm, Don dondod...@gmail.com wrote: Because it reverses one side twice and the other side not at all. It does a lot of work to accomplish nothing. Don On Feb 9, 9:06 am, Rahul Menon menonrahul1...@gmail.com wrote: How come it just reversed the root? I still dont get it! Rahul On Feb 9, 7:57 pm, Don dondod...@gmail.com wrote: It appears to be an attempt to reverse the tree. However, there is a problem. It reverses the left sub-tree, then swaps the left and right sub-trees. Then it reverses the right sub-tree. But wait! The original left sub-tree which we reversed is now the right sub-tree, so we actually unreversed it. And the left sub-tree has never been reversed at all. So I don't think that it will work. The actual result will be that left and right will be swapped in the root node. Beyond that, there will be no change. To make it work as intended, either do the two recursive calls one after the other, or change the second one from Right to Left. Don On Feb 9, 8:38 am, Rahul Menon menonrahul1...@gmail.com wrote: What does this function do? void function(Node **node){ if(*node!=NULL){ function((*node)-Left); Node *temp; temp = (*node)-Left; (*node)-Left= (*node)-Right; (*node)-Right = temp; function((*node)-Right); } }- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] [offtopic] Something to share for those preparing for Amazon Campus Interviews!
@RAHUL SINGHAL Sorry to bother you! Unfortunately I cant find any such links in topcoder. Can you just share a link here! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/kgVw78gONbIJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] [offtopic] Something to share for those preparing for Amazon Campus Interviews!
Hello friends, Recently I appeared for placement interviews for Amazon in my campus.Unfortunately though I couldn't make it, still want to share something for others here preparing for amazon interviews! First of all though it is very hard to crack, here are a few things which can make your preparation easier and effective! In the interview, I have found that most of the questions asked are repeated questions which are available online rather than any new questions they have made. A few examples are loop in a linked list, print all permuations of a string, binary search in a rotated array etc.. These all questions are very commonly found in websites like careercup.com and also in this google group. Instead of just going through hundreds of question be sure that you can perform the best of 100% if you are given from these frequently asked questions. Just to add, if you are very good in coding it's fine , else make sure that you can also code these above questions very well rather than just explaining the algos!. They will definitely ask you to code these! In Cracking the coding interview all the questions are very very important. To my astonishment most of the questions in the sections like Linked LIsts, Arrays, Trees and Graph, Recursion from the aforesaid book were asked in our interview! So never miss reading and coding these questions before going to your interview. Though it's very weird to say, I would say that if you are very very good with these around 40 most frequently repeated questions, which can be collected through googling, your performance is almost 80% guaranteed in the interview. It's sure that you will have to face only a very few question outside from this. And if you are somewhat more good enough , you can easily make through to the AMAZON! All the best for all :) Repeating once again, rather than just reading through hundreds of questions it would be best if you practice coding and studying the few 30 interview questions! Else you will have to regret like me :| #We will be having Google on our campus soon! I'm totally strange to their selection process,tests and intreview, so if anyone have any idea please do share here! Thanks! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: [offtopic] Something to share for those preparing for Amazon Campus Interviews!
I dont remember exactly! There where a few questions from Computer Networks, OS etc also a few aptitude questions! 20 mcq + 2 programming questions, On Jul 28, 5:31 pm, Neha Sharan neharick...@gmail.com wrote: @rahul:what kind of questons were asked in aptitude test? On Thu, Jul 28, 2011 at 5:54 PM, Rahul Menon menonrahul1...@gmail.comwrote: Hello friends, Recently I appeared for placement interviews for Amazon in my campus.Unfortunately though I couldn't make it, still want to share something for others here preparing for amazon interviews! First of all though it is very hard to crack, here are a few things which can make your preparation easier and effective! In the interview, I have found that most of the questions asked are repeated questions which are available online rather than any new questions they have made. A few examples are loop in a linked list, print all permuations of a string, binary search in a rotated array etc.. These all questions are very commonly found in websites like careercup.com and also in this google group. Instead of just going through hundreds of question be sure that you can perform the best of 100% if you are given from these frequently asked questions. Just to add, if you are very good in coding it's fine , else make sure that you can also code these above questions very well rather than just explaining the algos!. They will definitely ask you to code these! In Cracking the coding interview all the questions are very very important. To my astonishment most of the questions in the sections like Linked LIsts, Arrays, Trees and Graph, Recursion from the aforesaid book were asked in our interview! So never miss reading and coding these questions before going to your interview. Though it's very weird to say, I would say that if you are very very good with these around 40 most frequently repeated questions, which can be collected through googling, your performance is almost 80% guaranteed in the interview. It's sure that you will have to face only a very few question outside from this. And if you are somewhat more good enough , you can easily make through to the AMAZON! All the best for all :) Repeating once again, rather than just reading through hundreds of questions it would be best if you practice coding and studying the few 30 interview questions! Else you will have to regret like me :| #We will be having Google on our campus soon! I'm totally strange to their selection process,tests and intreview, so if anyone have any idea please do share here! Thanks! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: [offTopic] Any one attended Informatica Interview
I am placed! :) On Jul 20, 9:43 pm, Reynald Suz reynaldsus...@gmail.com wrote: Round-1 :Aptitude (OS, SQL, Data Structures Problem Solving) Round-2: Technical Interview - (Qns from UNIX/DB/Algorithms) Round-3: Technical Interview - (Qns with regard to projects you have done) Round-4: HR interview On Wed, Jul 20, 2011 at 9:25 PM, Rahul Menon menonrahul1...@gmail.comwrote: I would like if any here have attended informatica interview and also about the interview procedure. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Reynald Reni Masters in Software Engineering CIT - India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] [offTopic] Any one attended Informatica Interview
I would like if any here have attended informatica interview and also about the interview procedure. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Expression evaluation in C
Guys give me your thoughts on http://c-faq.com/expr/seqpoints.html According to this expressions like i++ * i++ have undefined behaviour! But havent we faced questions like this in our interview prelim tests??! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Hellof Friends. Regarding Microsoft Internship test
Thanks for the replies @Sunny Last year when they came to our college, they also asked questions relating to Operating Systems and Database. Did you forgot to mention it or is MS avoiding such questions now? Regards Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Hellof Friends. Regarding Microsoft Internship test
We are having microsoft internship test and interview in the month of february at our college. And we all have just started preparations in full swing. I think people here have much experience regarding the portions which are to be stressed for these kind of interviews and especially incase of MS internship test. Also if any other student here in India had intership test in the near past, it would be great if they could give an idea regarding the topics which are usually tested here. I would be thankful if the experts and even the recuiters here can give a light into it. The most probable subjects are, IMHO , DataStructures, Database, Operating System Specific topics if any, some one can mention it. Thankfully Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: Hellof Friends. Regarding Microsoft Internship test
I think Im good at Algorithms and Data Structures. Could you name a few which gives good resources!! Actually google suggest a lot !! so it would be better if some human can share their choice :) Regards Rahul On Sun, Jan 16, 2011 at 6:54 PM, juver++ avpostni...@gmail.com wrote: Heh, to apply for internship you should be confidence in yourself. If you are weak at algorithms and data structure now, no materials can help you to achieve the good level in a month. There are many sites with interview materils and probaple topics. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.