Re: [algogeeks] DeShaw Question....tough One

2010-09-06 Thread vignesh radhakrishnan
this group at http://groups.google.com/group/algogeeks?hl=en. -- Vignesh Radhakrishnan -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email

Re: [algogeeks] String Problems

2010-05-20 Thread vignesh radhakrishnan
@Marcio, I get your algo now. So a substring match is also a match. I get your approach. Thank you. Any ideas for the second problem? On 20 May 2010 10:45, vignesh radhakrishnan rvignesh1...@gmail.com wrote: @Mario Your estimate of no. of strings, I guess doesn't consider strings of length

Re: [algogeeks] String Problems

2010-05-20 Thread vignesh radhakrishnan
1014 needs any special algorithm, if we've got an H x W matrix, then we've got (4H+4W-2) strings in which you must look, and you can do this with a greedy strategy. 2010/5/19 vignesh radhakrishnan rvignesh1...@gmail.com I'm trying to solve some string problems somewat efficiently. Can someone

[algogeeks] String Problems

2010-05-19 Thread vignesh radhakrishnan
I'm trying to solve some string problems somewat efficiently. Can someone tell me what would be efficient DS for solving these problems http://acm.jlu.edu.cn/joj/showproblem.php?pid=1014 http://acm.jlu.edu.cn/joj/showproblem.php?pid=1873 Thanks, Regards, Vignesh -- There are two kinds of people.

Re: [algogeeks] Convert a Binary tree into spike.

2010-05-13 Thread vignesh radhakrishnan
do bfs. On 13 May 2010 09:18, vinayan c vinayan1...@gmail.com wrote: Something like this 1 2 3 4 5 67 1 | 2-3 | 4-5-6-7 -- You received this message because you are

Re: [algogeeks] compute kth smallest element from union of two lists

2010-05-13 Thread vignesh radhakrishnan
This is for kth largest. Change it for kth smallest In fact, this problem is amenable to something very similar to binary search. Suppose my arrays are A and B. The idea is to keep track of two indices, a (for A) and b (for B), such that a + b = k - 1 (it's very important to maintain this

Re: [algogeeks] 400!

2010-05-03 Thread vignesh radhakrishnan
will ultimately be able to store the output. I think Rajesh Patidar's answer fits the bill well, in terms of storage. On Sun, May 2, 2010 at 2:23 PM, vignesh radhakrishnan rvignesh1...@gmail.com wrote: I agree with abhijith. But given some very large x for which i would have to find factorial. I

Re: [algogeeks] a google question

2010-05-02 Thread vignesh radhakrishnan
@divya You're rite. Post a solution if you have one. -- Regards, Vignesh On 2 May 2010 13:14, divya jain sweetdivya@gmail.com wrote: @Mohit according to ur algo if a[1], b[0] has sum greater than a[0],b[1] then i is incremented i is now 2 so for next iteration u ll compare a[2] b[0]

Re: [algogeeks] 400!

2010-05-02 Thread vignesh radhakrishnan
I agree with abhijith. But given some very large x for which i would have to find factorial. I would either (i) use gmp in cpp or BigInteger or java if its not a lab exercise or an interview (ii) use simple brute multiplication algorithm. The second approach requires (a) The no. of digits

Re: [algogeeks] Divide and Conquer problem

2010-04-08 Thread vignesh radhakrishnan
You 've got n teams and nC2 ways of conducting the matches with specified constraints that's n/2(n-1). So, each day you need to conduct n/2 matches such that, no team repeats within a day, no match that was previously held repeats. Since the problem has an unique solution, you can either brute

Re: [algogeeks] Cartesian Product in set theory

2010-02-09 Thread vignesh radhakrishnan
The unordered pair will be a subset of cartesian product. What is the significance of it? On 8 February 2010 21:18, pinco1984 paris...@gmail.com wrote: Hi all, I have came across a problem and I am not aware if there is such a thing in set theory and if so what is it called. Mainly I have