Re: [algogeeks] FUNCTION POINTER IN C

2011-09-06 Thread Puneet Ginoria
i didn't go you.. It will be helpful if you could give me some running example or give me some link.. Thnx in Advance.. -- 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

Re: [algogeeks] FUNCTION POINTER IN C

2011-09-06 Thread Puneet Ginoria
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 Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] max product!

2011-08-07 Thread Puneet Ginoria
find the first three largest nos. and 3 smallest number(negatives).. then easily you can fig. out the solution.. O(6n) solution i guess which is O(n) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Fwd: max product

2011-08-07 Thread Puneet Ginoria
find the first three largest nos. and 3 smallest number(negatives).. then easily you can fig. out the solution.. O(6n) solution i guess which is O(n) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] MS: BST

2011-07-11 Thread Puneet Ginoria
@saurabh: finding succesor may not be O(1)... it can be O(logn) -- 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

Re: [algogeeks] Number Series

2011-07-10 Thread Puneet Ginoria
A[n] = n*(n+1)*(n+2) 1*2*3 = 6 2*3*4 = 24 3*4*5 = 60 4*5*6 = 120 so next numbers are 210,336 -- 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,

Re: [algogeeks] Re: find sol!!

2011-07-10 Thread Puneet Ginoria
n*n! = (n+1)! - n! -- 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

Re: [algogeeks] Re: Java Book

2011-06-13 Thread Puneet Ginoria
Java in 60 Minutes A Day.. by Rich Raposa.. its a good book for begginers... -- 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

Re: [algogeeks] Re: Divide 2 nos. without DIVISON

2011-05-22 Thread Puneet Ginoria
thnxx all.. i got the soln.. Qdumanshu: i was asking for quotient and remainder when we divide 2 nos. without actually dividing them... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Re: nearest neighbour

2011-05-19 Thread Puneet Ginoria
I guess the sorting in this case is not O(nlogn) If the nos. we are associating with each person from the number line , it can be sorted in O(n) time, if those nos. are in from {1,2,..n}. Correct me if I am Wrong -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] ThreeListSum

2011-01-14 Thread Puneet Ginoria
Sorry.. u need 2 sort only one array. whichever u likei was thinking to sort 1 array and wrote to sort all 3 anyway ... sort only one On Tue, Jan 11, 2011 at 1:18 PM, MOHIT mohit...@gmail.com wrote: @ puneet then we have to sort only one array, on which we doing binary search

Re: [algogeeks] ThreeListSum

2011-01-10 Thread Puneet Ginoria
sort all 3 arrays. then for any every combination of numbers in 2 arrays say, a and b do a binary search for element -(a+b) in the third array. It would be a O(N^2 logN) algorithm On Tue, Jan 11, 2011 at 12:04 PM, Decipher ankurseth...@gmail.com wrote: Given three lists: A, B and C of length n

Re: [algogeeks] DIVIDE TWO VARYING LENGTH NUMBERS.

2010-12-26 Thread Puneet Ginoria
I think that won't be feasible bcoz of high time complexity. Either you can use Python language which provides its own big number pakage or check this link. http://www.cse.iitd.ernet.in/~suban/CSL102/rsa/node21.html On Mon, Dec 27, 2010 at 2:17 AM, Aniket aniket...@gmail.com wrote: DIVIDE TWO

Re: [algogeeks] Re: Don't Sort

2010-12-25 Thread Puneet Ginoria
I can use bucket sort.But sorting is strictly prohibited. The question gives a hint which says use your data structure theory to figure this one out. On Sat, Dec 25, 2010 at 9:16 PM, juver++ avpostni...@gmail.com wrote: You may use bucket sort if extra space is enough. Second approach - find

Re: [algogeeks] Re: Find all the subset of an array whose sum is equal to some number

2010-12-25 Thread Puneet Ginoria
This attachment contains the code for the above program in SML language and it uses lambda calculus. On Sat, Dec 25, 2010 at 9:18 PM, juver++ avpostni...@gmail.com wrote: What you need to get for the answer - amount of such subsets or display them? First problem can be solved using DP.

Re: [algogeeks] Re: Find all the subset of an array whose sum is equal to some number

2010-12-25 Thread Puneet Ginoria
sorry i forgot to attach here it is On Sat, Dec 25, 2010 at 10:34 PM, Puneet Ginoria punnu.gino...@gmail.comwrote: This attachment contains the code for the above program in SML language and it uses lambda calculus. On Sat, Dec 25, 2010 at 9:18 PM, juver++ avpostni...@gmail.com wrote

Re: [algogeeks] random function

2010-12-24 Thread Puneet Ginoria
volume 2 , chapter 3 On Fri, Dec 24, 2010 at 11:13 AM, Puneet Ginoria punnu.gino...@gmail.comwrote: There is a book called The art of computer programming by donald knuth. He had discussed the random function in great detail. On Tue, Dec 21, 2010 at 8:06 PM, snehal jain learner

Re: [algogeeks] random function

2010-12-23 Thread Puneet Ginoria
There is a book called The art of computer programming by donald knuth. He had discussed the random function in great detail. On Tue, Dec 21, 2010 at 8:06 PM, snehal jain learner@gmail.com wrote: How do you write your own random function? -- You received this message because you are

Re: [algogeeks] Answer This

2010-12-18 Thread Puneet Ginoria
@Terence : I think this could be the best reason On Fri, Dec 17, 2010 at 1:58 PM, Terence technic@gmail.com wrote: I think nobody dies on the first 19 days and everyone dies on the 20th day. (I have no difference with other green-eyes. Why I have to suicide ealier? : ) Given: a)

Re: [algogeeks] Re: zero sum subarray

2010-11-30 Thread Puneet Ginoria
You may solve it using depth first search. it will give you all possible solutions On Sun, Nov 7, 2010 at 12:11 AM, Raj rajmangaltiw...@gmail.com wrote: Compute PrefixSum Array. PrefixSum[i]=a[0]+a[1]+a[2]++a[i-1]+a[i] Now problem reduces to finding two elements having same value. For