can u explain more on the coding question u solved????? On Sep 26, 9:08 am, aditya kumar <aditya.kumar130...@gmail.com> wrote: > I cleared the written round, the next round was coding round. > > We were asked to select any one problem out of three in 2 hrs. > > Q1) Given n number of xml files find a particular word and output should > list all the files in current directory that contains that word. > > Q2) Given a hierarichal structure i.e., you have a parent class, a child > class which extends a parent class which has some attributes and methods. > You need > > to parse the structure and output should give you the set of the base class, > set of derived class, set of attribute set and the set of method. > > Q3) Input -> India is a great country. Key(alphanumeric) - B2. You have to > encrypt the given sentence, in such a way that only the words should be > jumbled. > > Output -> great India a is country. While decrypting it, you have to use the > same alpha numeric key and we should be able to get the same original > string, > > i.e., India is a great country. > > I opted for the 3rd question, I used an array to store the starting offset > of a word and i used key to shuffle the offset. i used hash function which > takes > > the key and according the key value it shuffles the set of offsets while > doing encryption. While decrypting i used the reverse method and i shuffled > the same > > way to get back the original offset. After 2 hrs the external asked me to > explain my logic, i explained each and every line and he was very much happy > with > > the algorithm. He asked all the students to wait outside. > > They shortly announced the results for the next interview round. > > Technical round -1 > > He asked me whether i was nervous, i told him frankly, yes sir a little bit. > Then he motivated me by saying that you have done well in the previous > rounds > > thats why you are here. > > Then he asked me to solve a problem. The problem was given a time in format > of hh:mm we have to find the min angle between hr nd min hand. > > I answered him well and he was happy with that so he did not aske me to > write the code. > > Second question -> There is a system which continuously takes stream of data > from one end, and from other end we want to retrive the particualr number > is > > present in the system or not. Example -> If you are retriving for 10 and if > it is present then return the same number else return the closest value to > that > > number. I used hashing then he asked me if I had a large input let us say in > lakhs then hashing is not ideal approach. Then i told him that its better to > use > > max heap. Then he said ok and before moving to next questions he told me > that there are other better approach to this. > > He asked about my favourite subjects since i told my fav subject was OS, he > started askimg me questions about OS. > > The questions were > > -Difference b/w semaphore and monitor > > -There are two threads, one produces even number and other produces odd > number, how will you print the consecutive numbers. > > -What is semaphore and how will you implement it? > > -What is deadlock and what are 4 conditions of deadlock. > > -Simulate deadlock(Pictorial diagram). > > -Which data structure will you use for deadlock? > > I answered all the above questions so he was very much happy with it. > > Then and there he told me that i wont eliminate you in this round and would > like to see you in next round. > > Technical round-2 > > He asked me about my previous round experience and asked me to introduce > myself for another 2/3 mins. > > He gave me a problem, there is a function which returns 0 or 1. You need to > pass each and every element of the array one by one to that function and > > depending on the return value, you need to store all the numbers in such a > way that all the true values should appear first and all the false value > should > > appear last. After thinking for some time i came up with O(n) solution, he > asked me to future optimze it. Within 2 mins he moved on to next question. > > Next question was a puzzle about aliens. > > Third question was about the real life example of stack. > > Fourth question was how the internet works as i told that OS and networking > was my strong subject. > > Fifth question was how will you implement tree in real life example. > > He asked me to wait outside for the result. > > I got elimiated in that round and the next was HR round. > > On Sun, Sep 25, 2011 at 9:06 PM, Aditya Virmani > <virmanisadi...@gmail.com>wrote: > > > > > > > > > neone who has appeared for yahoo recently? can ne one mention thr i/w / > > written rounds experience; they visited dce 3 days back & also nit > > surathkal... > > > -- > > 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.