Re: [algogeeks] Directi Questions - needed answers

2011-09-19 Thread teja bala
5 ans-C reference http://en.wikipedia.org/wiki/Reentrant_(subroutine) On Sat, Sep 17, 2011 at 9:11 AM, VIHARRI viharri@gmail.com wrote: 1. Minimum no.of comparisons required to select the 2nd max element in an array of N numbers. 2. What are the number of counting ties for four horses.

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Dheeraj Sharma
ans 7. - 15 km east and 12 km south of origin On Sat, Sep 17, 2011 at 11:29 AM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: Ans 8. 62.5 % ??? On Sat, Sep 17, 2011 at 9:11 AM, VIHARRI viharri@gmail.com wrote: 1. Minimum no.of comparisons required to select the 2nd max element

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Ashima .
ans1: i think 2n but may be better solution is posible Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Fri, Sep 16, 2011 at 11:19 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: ans 7. - 15 km east and 12 km south of origin On Sat, Sep 17, 2011 at 11:29 AM,

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Ashima .
ans 2: http://www.qbyte.org/puzzles/p131s.html Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sat, Sep 17, 2011 at 1:46 AM, Ashima . ashima.b...@gmail.com wrote: ans1: i think 2n but may be better solution is posible Ashima M.Sc.(Tech)Information Systems 4th year

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Ashima .
ans7: my answer is coming to be as 12km west and 12 km south Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sat, Sep 17, 2011 at 3:57 AM, Ashima . ashima.b...@gmail.com wrote: ans 2: http://www.qbyte.org/puzzles/p131s.html Ashima M.Sc.(Tech)Information Systems

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Yogesh Yadav
Ans 1. apply bubble sort. outer loop should run just two times because in 2nd time the 2nd largest element will be at 2nd last position... comparisons=(n-1)+(n-2) On Sat, Sep 17, 2011 at 4:27 PM, Ashima . ashima.b...@gmail.com wrote: ans 2: http://www.qbyte.org/puzzles/p131s.html Ashima

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Ashima .
ans 8: it should be 40% @dheeraj: if total is 100 percent and other person paid more than 1st person.Than how can the 1st person's percentage be more than 50%? Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sat, Sep 17, 2011 at 4:20 AM, Yogesh Yadav medu...@gmail.com

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread aditya kumar
@yogesh: we can get second max by comparing n elements ie O(n). On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote: ans 8: it should be 40% @dheeraj: if total is 100 percent and other person paid more than 1st person.Than how can the 1st person's percentage be more than

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Yogesh Yadav
Ans 7 11 km west...14 km south On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote: ans 8: it should be 40% @dheeraj: if total is 100 percent and other person paid more than 1st person.Than how can the 1st person's percentage be more than 50%? Ashima

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Yogesh Yadav
@aditya: comparing isn't complexity here... here it means no. of comparisons between 2 numbers... On Sat, Sep 17, 2011 at 5:04 PM, aditya kumar aditya.kumar130...@gmail.comwrote: @yogesh: we can get second max by comparing n elements ie O(n). On Sat, Sep 17, 2011 at 4:59 PM, Ashima .

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread malay chakrabarti
ans 1 n+logn -2 (JU_CSE) On Sat, Sep 17, 2011 at 5:04 PM, Yogesh Yadav medu...@gmail.com wrote: Ans 7 11 km west...14 km south On Sat, Sep 17, 2011 at 4:59 PM, Ashima . ashima.b...@gmail.com wrote: ans 8: it should be 40% @dheeraj: if total is 100 percent and other person paid more than

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread aditya kumar
see here the basic operation is comparision so we can express comaprision in terms of order of O(n). newazz we still require n-1 comparisions to find second max . On Sat, Sep 17, 2011 at 5:06 PM, Yogesh Yadav medu...@gmail.com wrote: @aditya: comparing isn't complexity here... here it means no.

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Dheeraj Sharma
@ashima...its asking just for pens..and that of alam..so wat i still think..is 62.5% On Sat, Sep 17, 2011 at 5:09 PM, aditya kumar aditya.kumar130...@gmail.comwrote: see here the basic operation is comparision so we can express comaprision in terms of order of O(n). newazz we still require n-1

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Yogesh Yadav
yeah it will be 62.5% On Sat, Sep 17, 2011 at 5:14 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @ashima...its asking just for pens..and that of alam..so wat i still think..is 62.5% On Sat, Sep 17, 2011 at 5:09 PM, aditya kumar aditya.kumar130...@gmail.com wrote: see here the

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Dheeraj Sharma
12 west and 10 south.. i thnk..is the correct one.. On Sat, Sep 17, 2011 at 5:22 PM, Yogesh Yadav medu...@gmail.com wrote: yeah it will be 62.5% On Sat, Sep 17, 2011 at 5:14 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: @ashima...its asking just for pens..and that of alam..so

Re: [algogeeks] Directi Questions - needed answers

2011-09-17 Thread Yogesh Yadav
12 west ...12 south On Sat, Sep 17, 2011 at 5:24 PM, Dheeraj Sharma dheerajsharma1...@gmail.com wrote: 12 west and 10 south.. i thnk..is the correct one.. On Sat, Sep 17, 2011 at 5:22 PM, Yogesh Yadav medu...@gmail.com wrote: yeah it will be 62.5% On Sat, Sep 17, 2011 at 5:14 PM,

[algogeeks] Directi Questions - needed answers

2011-09-16 Thread VIHARRI
1. Minimum no.of comparisons required to select the 2nd max element in an array of N numbers. 2. What are the number of counting ties for four horses. ( example for two horses A and B there are three cases - A wins, B wins, A B ties ). 3. What are the minimum no.of tournaments needed to get the