Re: [algogeeks] Amazon written test question

2012-02-23 Thread HARISH S.C
Hi, Construct a BST with 2,1,3. If my understanding is right, now distance between 2,3 will be 2. Will this algo return the correct answer?. On Thu, Feb 2, 2012 at 1:43 PM, Manni mbd mbd2...@gmail.com wrote: Forget my previous post. it useless i think Firstly there will be only 1 node

Re: [algogeeks] FUNCTION POINTER IN C

2011-09-07 Thread HARISH S.C
Check this http://andreinc.net/2010/09/30/generic-data-structures-in-c/ On Tue, Sep 6, 2011 at 10:02 PM, Puneet Ginoria punnu.gino...@gmail.comwrote: i am getting things in C++ but i need all this to be done in C. -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: Stack problem

2011-09-07 Thread HARISH S.C
@Don: given stack will be 20 1 3 1 5 1 6 1 2 1 Minimum Stack will be 20 1 1 1 1 1 After pop 1 min stack 20 1 1 1 1 pop 2 min stack 20 1 1 1 1 pop 1 min stack 20 1 1 1 pop 6 min stack 20 1 1 1 pop1 min stack 20 1 1 pop 5 min stack 20 1 1 pop 1 min stack 20 1 pop 3 min stack 20 1 pop

Re: [algogeeks] FUNCTION POINTER IN C

2011-09-06 Thread HARISH S.C
Hi, Google Template classes in c++ (or) generic classes in c++ you will get lots of example Regards, S.C.Harish Associate Software Engineer, Cordys RD http://www.cordys.com/, Hyderabad On Mon, Sep 5, 2011 at 5:11 PM, kARTHIK R k4rth...@gmail.com wrote: For sending the type, you dont have to

Re: [algogeeks] Re: Stack problem

2011-09-06 Thread HARISH S.C
Have a separate stack for minimum. While pushing, insert the number in minimum stack only if the given number is less that or equal to the number @ the top of min stack. While removing, remove the value from min stack only if its equal to the value thats popped. -- You received this message

Re: [algogeeks] Admin of Group

2011-05-30 Thread HARISH S.C
+1 On Thu, May 26, 2011 at 9:31 PM, Ashish Patel ashishpatel1...@gmail.comwrote: +1000 ..dont count this as SPAM! :D On Thu, May 26, 2011 at 9:29 PM, radha krishnan radhakrishnance...@gmail.com wrote: +100 On Thu, May 26, 2011 at 9:26 PM, pacific :-) pacific4...@gmail.comwrote: +1

Re: [algogeeks] Link list Problem

2011-03-16 Thread HARISH S.C
Its a standard question and balaji's approach has been accepted as the best possible solution. @Krace: In the list 1-2-3-4-5, If address of 3 is the only known value if u want to delete 3 from the list, this wont work. -- You received this message because you are subscribed to the Google

Re: [algogeeks] give answer

2011-03-16 Thread HARISH S.C
I am sure if you google it , u can find many points. Abstract classes n interface wont have any object on its own. Abstract class acts base class during inheritance. Interface contains a predefined layout for a class. In abstract class, we can define what a function should do whereas in

Re: [algogeeks] Link list Problem

2011-03-16 Thread HARISH S.C
Now u know 3's address. So copy the content of next node, say 4. Now you have 1-2-3-4-4-5. Now delete the next node. So now we have 1-2-3-4-5-. Which means 3 has been deleted. On Wed, Mar 16, 2011 at 6:37 PM, kracekumar ramaraju kracethekingma...@gmail.com wrote: . -- You received this

Re: [algogeeks] Re: 10 digit problem

2011-03-16 Thread HARISH S.C
Hi its number of zeros following it or no of 0s immediately after it. On Wed, Mar 16, 2011 at 7:07 PM, HARISH S.C s.c.har...@gmail.com wrote: The best answer I can come up with is 9 503000 (or) 90 On Mon, Mar 14, 2011 at 1:37 PM, bittu shashank7andr...@gmail.com wrote: i don't

Re: [algogeeks] Re: Microsoft Written test questions required

2011-03-13 Thread HARISH S.C
@Akshata Hi Sorry for late reply. Amrita School Of Engineering,Coimbatore On Sun, Feb 13, 2011 at 10:04 AM, Akshata Sharma akshatasharm...@gmail.comwrote: @harish: which college? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] Re: Microsoft Written test questions required

2011-02-12 Thread HARISH S.C
We had MS interview on 22nd jan.Written test was very easy. We had 2 technical question 1.Convert an decimal integer to binary string(10 marks) 2.sort a doubly linked list(5 marks) 2 very easy apti question for 5 marks like there are 20 people in party. each one shakes hand with others twice,

Re: [algogeeks] Microsoft Written test questions required

2011-02-12 Thread HARISH S.C
They also asked us to find the output of 2 C pgm involving pointers for 5 marks. On Wed, Feb 2, 2011 at 3:04 PM, Ricky rajeevpo...@gmail.com wrote: Hi Guys, I want to know about questions asked in written test for Microsoft. I come to know that it will be for 1.5 hours and it will consists

Re: [algogeeks] Re: Amazon Written Tes Q1

2011-02-01 Thread HARISH S.C
n be the minimum value in the list m be the maximum value in the list Have an array C[m-n] Initialize C to zero. now Node *node=head; while(node!=NULL) { C[node-info-n]++; } now using the array C,create a sorted list. Since we are using doubly linked list,we might have some other

Re: [algogeeks] Re: Amazon Written Tes Q1

2011-02-01 Thread HARISH S.C
sorry in above solution add node=node-next in while loop On Wed, Feb 2, 2011 at 1:05 AM, HARISH S.C s.c.har...@gmail.com wrote: n be the minimum value in the list m be the maximum value in the list Have an array C[m-n] Initialize C to zero. now Node *node=head; while(node!=NULL

[algogeeks] Microsoft interview question

2011-02-01 Thread HARISH S.C
We have a text editor application where we can choose 1)between 100s of different fonts like arial,calibri,etc.. 2)different text sizes 3) different formatting such as bold, Italics,regular,etc.. Imagine that the application is similar to word(there we will have these options). Now give different

Re: [algogeeks] Microsoft interview question

2011-02-01 Thread HARISH S.C
from my BlackBerry -- *From: * HARISH S.C s.c.har...@gmail.com *Sender: * algogeeks@googlegroups.com *Date: *Wed, 2 Feb 2011 01:14:00 +0530 *To: *algogeeks@googlegroups.com *ReplyTo: * algogeeks@googlegroups.com *Subject: *[algogeeks] Microsoft interview question We

Re: [algogeeks] Amazon Written Tes Q1

2011-01-31 Thread HARISH S.C
If space is not a constrain, try to do it using count sort http://en.wikipedia.org/wiki/Counting_sort Regards, S.C.Harish On Sun, Jan 30, 2011 at 6:10 PM, bittu shashank7andr...@gmail.com wrote: Sort the Doubly Linked List..In Minim time complexity...is it possible to sort doubly linked list