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

2010-09-06 Thread Vivek Sundararajan
what do you mean by scattered subsequence? can you give the expected output for your example case? On 6 September 2010 14:01, bittu shashank7andr...@gmail.com wrote: u are given an array and u have to print the longest increasing scattered subsequence...eg..{11,9,8,2,10,7,3,4,5}. Solve it

Re: [algogeeks] Re: There is an array of odd and even numbers. Now, sort them in such a way that the top portion of the array contains odd numbers, bottom portion contains even numbers

2010-06-24 Thread Vivek Sundararajan
Hi, how about this - Do a merge sort, now, while merging two sorted list, give more priority to odd numbers :) I believe this falls into the right solutions :) Any breaking cases? On 24 June 2010 09:41, Gaurav Singh gogi.no...@gmail.com wrote: I think in this case, bubble sorting will be a

Re: [algogeeks] doubly linked list

2010-06-17 Thread Vivek Sundararajan
@Anand: Thank you :) On 17 June 2010 16:14, Vivek Sundararajan s.vivek.ra...@gmail.com wrote: Hi Anand, your dedicated and neatly formated reply is much appreciated! :) On 16 June 2010 23:59, divya jain sweetdivya@gmail.com wrote: yes u need to start frm beg.. On 16 June 2010 17:15

Re: [algogeeks] lowest common ancestor

2010-06-17 Thread Vivek Sundararajan
http://www.topcoder.com/tc?module=Staticd1=tutorialsd2=lowestCommonAncestor The above link gives a detailed explanation about LCA and RMQ On 17 June 2010 15:30, jalaj jaiswal jalaj.jaiswa...@gmail.com wrote: write an algo which gives the lowest common ancestor of two nodes in a general

Re: [algogeeks] doubly linked list

2010-06-17 Thread Vivek Sundararajan
Hi Anand, your dedicated and neatly formated reply is much appreciated! :) On 16 June 2010 23:59, divya jain sweetdivya@gmail.com wrote: yes u need to start frm beg.. On 16 June 2010 17:15, Vivek Sundararajan s.vivek.ra...@gmail.com wrote: so, this means that i can traverse the list

Re: [algogeeks] doubly linked list

2010-06-16 Thread Vivek Sundararajan
so, this means that i can traverse the list only from the beginning of the link list right? what if im given a pointer pointing to some node other than the head of the doubly linked list? will i be able to traverse in any direction now? please let me know if im missing something :) Thank you,

Re: [algogeeks] Cycle in Undirected and Directed Graphs

2010-06-15 Thread Vivek Sundararajan
@above: Any Undirected Graph trivially has a cycle! Consider any two adjacent vertex A and B, I can go from A to B and then from B to A (since they are connected by an undirected edge). Hence, any Undirected Graph trivially has a cycle. Any contradictory views? please let me know :) Thank

Re: [algogeeks] Max Area of a Triangle

2010-06-15 Thread Vivek Sundararajan
can only think of O(N^3) brute force solution - any better ideas? :) On 14 June 2010 16:57, amit amitjaspal...@gmail.com wrote: Given N points how can we find a triangle formed using any of the three points with maximum area? -- You received this message because you are subscribed to the

Re: [algogeeks] Re: infix

2010-06-11 Thread Vivek Sundararajan
@Rohit Consider : (a+)b The above is not well formed! :) On 11 June 2010 11:58, Rohit Saraf rohit.kumar.sa...@gmail.com wrote: @BALARUKESH : What are you saying !! and Why would this not work As you start you get sum -1 at start itself. Hence you quit. The sum should be 0 always and 0 at

[algogeeks] Invitation to connect on LinkedIn

2009-12-15 Thread Vivek Sundararajan
LinkedIn Vivek Sundararajan requested to add you as a connection on LinkedIn: -- Phani, I'd like to add you to my professional network on LinkedIn. - Vivek Accept invitation from Vivek Sundararajan http://www.linkedin.com/e