Re: [algogeeks] Re: storing URL's

2012-05-18 Thread Ashish Goel
Tiger Tree Hash Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Thu, May 17, 2012 at 11:16 PM, Prem Krishna Chettri hprem...@gmail.comwrote: For the cases where Storing the Value is the only Concern and (Not the Retrieval efficiency), I would

Re: [algogeeks] Re: Algo for Search in a 2D Matrix

2012-05-18 Thread Ashish Goel
Anika, what you are talking about is finding a specific element, not the kth largest or smallest element, can you give a walk through with an example in case i have understood you incorrectly Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Thu,

Re: [algogeeks] Interview Question based on histogram

2012-05-18 Thread payal gupta
//A -area of the cell of histogram // volarr[] -holds the vol of water already present at particular index void fn(int index,int volpoured) { int vcapacity=A*heightarr[index]; if(volpoured+volarr[index]vcapacity) { volarr[index]+=volpoured; return; } if(volpoured+volarr[index]vcapacity) {

Re: [algogeeks] Re: validate bit pattern : MS question

2012-05-18 Thread Ashish Goel
i changed the last step to return (n == ~0); Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Fri, May 18, 2012 at 11:27 AM, Vishal Thanki vishaltha...@gmail.comwrote: On Sat, Apr 7, 2012 at 11:24 AM, Dave dave_and_da...@juno.com wrote:

[algogeeks] Partition the array with equal average

2012-05-18 Thread payal gupta
How do you partition an array into 2 parts such that the two parts have equal average?...each partition may contain elements that are non-contiguous in the array... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on

Re: [algogeeks] Partition the array with equal average

2012-05-18 Thread Prem Krishna Chettri
I guess this is Subset minimization problem's Modification.. Algo.. 1 Get all the Subset of the particular array. Best Algo O(n2). 2 Now try to find the subsets having similar average. Again best algo known is O(n2). Anyone have better options?? BR, Prem On Fri, May 18, 2012 at 12:05 PM,

Re: [algogeeks] Partition the array with equal average

2012-05-18 Thread saurabh singh
Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Thu, May 17, 2012 at 11:40 PM, Prem Krishna Chettri hprem...@gmail.comwrote: I guess this is Subset minimization problem's Modification.. Algo.. 1 Get all the Subset of the particular array. Best Algo

Re: [algogeeks] Partition the array with equal average

2012-05-18 Thread Prem Krishna Chettri
Are U asking the Code Again ?? :) On Fri, May 18, 2012 at 2:19 PM, saurabh singh saurab...@gmail.com wrote: Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Thu, May 17, 2012 at 11:40 PM, Prem Krishna Chettri hprem...@gmail.com wrote: I guess

[algogeeks] DDoS Attacks detection ...

2012-05-18 Thread muthulakshmi
Can anyone please suggest me some ideas for proposing new IP traceback algorithm that can be adopted for DDoS attacks detection ? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] DDoS Attacks detection ...

2012-05-18 Thread Ashok Kumar Soundararajan
Hi Muthulakshmi, I did my project in DDoS in 2010. According to me, it will be innovative and challenging, if you try to use some artificial intellgence and machine learning concepts in designing your algorithm..and also IP traceback mechanism has been already proposedso better think of

Re: [algogeeks] DDoS Attacks detection ...

2012-05-18 Thread muthulakshmi
thank u ashok for ur reply On Friday, May 18, 2012 8:26:49 PM UTC+5:30, @$h()k wrote: Hi Muthulakshmi, I did my project in DDoS in 2010. According to me, it will be innovative and challenging, if you try to use some artificial intellgence and machine learning concepts in designing

Re: [algogeeks] Re: storing URL's

2012-05-18 Thread rahul ranjan
rope data structure can be gud in such cases.. hashing may not be too efficient as many url wud almost be same as mentioned by prakash. trie is another option but i believe overhead in trie will be more... correct me if i am wrong. On Fri, May 18, 2012 at 11:33 AM, Ashish Goel

Re: [algogeeks] Partition the array with equal average

2012-05-18 Thread adarsh kumar
You can reduce this problem to the sum-subset problemhttp://en.wikipedia.org/wiki/Subset_sum_problem . Let A be the array. Compute S = A[0] + ... + A[N-1], where N is the length of A. For k from1 to N-1, let T_k = S * k / N. If T_k is an integer, then find a subset of A of size k that sums to

Re: [algogeeks] Re: Partition the array with equal average

2012-05-18 Thread payal gupta
@adarsh why have we taken an assumption of the average to be integer all the time it could be float as well? @prem how could we find all possible subsets in tc-O(n2) as it will clearly be exponential... On Sat, May 19, 2012 at 8:58 AM, Gene gene.ress...@gmail.com wrote: We discussed this some