Re: [algogeeks] Re: Infinite Array

2011-09-30 Thread Ashima .
isnt this quest a lil wrong. coz suppose if i dnt know the length of an array,then how will i access the last element of the array.in such a case,i will almost traverse the whole memory and still not stop. coz compiler does not give array out of bound exception. Ashima M.Sc.(Tech)Information

Re: [algogeeks] without using '-'

2011-09-26 Thread Ashima .
grt.we never generally use ~ operator. got to knw abt it. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 26, 2011 at 10:07 AM, ~*~VICKY~*~ venkat.jun...@gmail.comwrote: Tricky question with more tricky answers. thank you all. On Mon, Sep 26, 2011 at 9:55

Re: [algogeeks] c doubt show me how smart u guys are

2011-09-25 Thread Ashima .
use radix sort 4 times. using bucket sort with chaining as the sorting algorithm. time complexity= O(4(n+k)) space complexity = O(n) Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sun, Sep 25, 2011 at 6:01 AM, Jasveen Singh jasveen.sing...@gmail.comwrote: i have

Re: [algogeeks] plz reply quickly

2011-09-23 Thread Ashima .
.If next of end is head then its circular. Rather for queue, u hv track of both front and rear, so just check if rear-next ==front. One line code. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Fri, Sep 23, 2011 at 8:13 AM, Aditya Virmani virmanisadi...@gmail.comwrote

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread Ashima .
m getting result in 95 matches Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 19, 2011 at 7:07 PM, malay chakrabarti m1234...@gmail.comwrote: i have explained :) On Sun, Sep 18, 2011 at 11:53 PM, Ashima . ashima.b...@gmail.com wrote: @malay: how cm n

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-18 Thread Ashima .
rite! 62.5% Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sat, Sep 17, 2011 at 9:04 PM, malay chakrabarti m1234...@gmail.comwrote: create a tournament tree.in each round one value is eliminated to obtain in the process the winner or the highest value in n-1

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-18 Thread Ashima .
@malay: how cm n+logn-2? cn u explain the logic ? Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sun, Sep 18, 2011 at 11:07 AM, Ashima . ashima.b...@gmail.com wrote: rite! 62.5% Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Sat

Re: [algogeeks] Plz explain the output..........

2011-09-17 Thread Ashima .
@yogesh : but if in place of x=1 in above code, I write t=54. that means i m assigning somevalue to a float variable.Then it should print 54 afterwards. but its again printing 98. how does it go with ur concept. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Fri, Sep

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 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] Re: Math Puzzle

2011-09-15 Thread Ashima .
solution is =3 with the condition p!=0 and q!=0 and r!=0 Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Thu, Sep 15, 2011 at 10:38 PM, Piyush Grover piyush4u.iit...@gmail.comwrote: @abhinav... it's not about being over smart or to show someone or to prove someone

Re: [algogeeks] Re: Please provide Code to Find kth Smallest or kth Largest element in unsorted array in liner time ?

2011-09-05 Thread Ashima .
@dave:what if u have duplicate elements Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Sep 5, 2011 at 7:11 PM, Dave dave_and_da...@juno.com wrote: @Sachin: Correct: in one quicksort pivoting pass, the array is rearranged so that the pivot element is put

Re: [algogeeks] Re: subarray wid sum=k

2011-09-02 Thread Ashima .
in subset and 2nd child node indicates that number was not taken.similarly make a tree with all such possible combinations. FInd sum corresponding to all the the paths. If that sum =k(given) then it means subset exists.Else not. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan

Re: [algogeeks] what is the error???

2011-08-31 Thread Ashima .
u hv just declared the variable and not defined it.So no memory is allocated to var. so u l get the undefined reference error. either remove extern or define new local variable int var =10; Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Wed, Aug 31, 2011 at 7:56 AM

Re: [algogeeks] Re: microsoft interview

2011-08-31 Thread Ashima .
@dave wats d logic behind ur code Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Wed, Aug 31, 2011 at 9:05 AM, Dave dave_and_da...@juno.com wrote: @Manish: for( i = 1 ; i n ; ++i ) for( j = 1 ; j m ; ++j ) if( a[i][j] != 0 ) a[i][0] = a[0

Re: [algogeeks] Re: Amazon Ques

2011-08-22 Thread Ashima .
Since its not a Linked list, so get middle value from top pop till middle element and push elements in a new stack. again push the elemetns back to original stack,except for the middle element. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Aug 22, 2011 at 8:49 PM

Re: [algogeeks] amazon

2011-08-22 Thread Ashima .
in both the cases. Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Mon, Aug 22, 2011 at 9:34 PM, sukran dhawan sukrandha...@gmail.comwrote: take the size of char * p and char p [] to confirm the same On Mon, Aug 22, 2011 at 9:32 PM, Anand Prasad anandprasa

Re: [algogeeks] how to find median of two sorted arrays

2011-08-19 Thread Ashima .
@Arjoo kumar value of loops will vary acc to sum is odd or even loops = sum/2 (sum even) =(sum/2) + 1 (sum odd) Ashima M.Sc.(Tech)Information Systems 4th year BITS Pilani Rajasthan On Fri, Aug 19, 2011 at 11:10 AM, Sanjay Rajpal tosanjayraj...@gmail.comwrote: Plz make one point clear can we