Re: [algogeeks] extendible hashing

2011-02-17 Thread jagannath prasad das
@ashish goel:can you plz give the link On Mon, Feb 14, 2011 at 9:00 AM, Ashish Goel ashg...@gmail.com wrote: check on code.google.com a very nice code there, that i had picked 1 yr back...you may like to find Best Regards Ashish Goel Think positive and find fuel in failure +919985813081

[algogeeks] Directory Structure

2011-02-17 Thread Akshata Sharma
On Unix computers, data is stored in directories. There is one root directory, and this might have several directories contained inside of it, each with di fferent names. These directories might have even more directories contained inside of them, and so on. A directory is uniquely identified by

[algogeeks] DCE techfest

2011-02-17 Thread Tushar Bindal
***DELHI TECHNOLOGICAL UNIVERSITY* *(Formerly DELHI COLLEGE OF ENGINEERING)** CSI-DTUPHOENIX'11 presents FIREWALL* *The Art Of Hacking * * * Do you swear by having the key to every single lock? Do you think you possess the innate talent of finding loopholes in anything and

[algogeeks] Delhi College of Engineering techfest competition

2011-02-17 Thread Tushar
DELHI TECHNOLOGICAL UNIVERSITY (Formerly DELHI COLLEGE OF ENGINEERING) PHOENIX'11 presents

[algogeeks] Re: Find duplicate element in an array

2011-02-17 Thread bittu
@^^ many solution to this problem in O(n) METHOD 1(Use sum formula) Algorithm: 1. Get the sum of numbers total = n*(n+1)/2 2 Subtract all the numbers from sum and you will get the missing number. Time Complexity: O(n) METHOD 2(Use XOR) 1) XOR all the array elements, let the

[algogeeks] Array Question

2011-02-17 Thread bittu
We have three arrays A=[a1,a2,...an] B=[b1,b2,...bn] C=[c1,c2,...cn] Write a method which takes these three arrays as input and return true if there is a combination [ai,bj,ck] such that ai+bj+ck = 0. O(n^3) solution is obvious. The questions is can we do better than this? Thanks

Re: [algogeeks] Array Question

2011-02-17 Thread jalaj jaiswal
i have a n^2logn solution sort the third array,.. then for every pair in a and b search for the number which makes the sum zero using binary search but guess a better soln must exist On Thu, Feb 17, 2011 at 11:38 PM, bittu shashank7andr...@gmail.com wrote: We have three arrays

Re: [algogeeks] Array Question

2011-02-17 Thread Balaji Ramani
Here are two methods to do in O(n^2) 1) Insert elements of first array in hash and then for every pair of elements in (Bj, Ck) find if -(Bj + Ck) is in hash 2) Without extra space: sort arrays A and B now for each element in Ck find a pair (Ai, Bj) which sums to -Ck as below let p1 point to

[algogeeks] Re: Array Question

2011-02-17 Thread Dave
In O(n^2). Sort two of the arrays, say B and C, into ascending order. For each element in A, search forward in B and backwards in C looking for a zero sum. Something like this, using zero-based arrays of length n: int i, j, k; for( i = 0 ; i n ; ++i ) { j = 0; k = n-1; while( (j n)

[algogeeks] Matrix will Stuck..!!!!!!!!

2011-02-17 Thread bittu
you have 2-d array, with m length and n width.You are also given k, ( k=n k=m ). Now, select a square of size k, which returns maximum sum.In Minimum Time Complexity Thanks Regards Shashank. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Re: Find duplicate element in an array

2011-02-17 Thread nphard nphard
I fail to see how any of them work in the general case. In fact, I don't even see them working with range restrictions for n. Also what is the missing number you are talking about? The question is to find the repeated number. As I said before, its an element uniqueness problem whose lower bound