[algogeeks] Re: Find all longest increasing subsequence of length k

2012-02-07 Thread vetri
hi atul, will the output also have these sequence or only those you mentioned? + 7 8 11 + 7 8 10 + 7 9 11 + 8 9 11 + 4 10 11 can u explain the question more? On Jan 30, 12:43 pm, Manni mbd mbd2...@gmail.com wrote: @Manee: can u explain a bit more !! still unclear On 1/30/12, Manee

[algogeeks] Re: Find all longest increasing subsequence of length k

2012-02-07 Thread vetri
) at a time and leaving the rest.i.e., 7 8 9, 7 8 10, 7 8 11, 7 9 10, 7 9 11, 7 10 11 8 9 10, 8 9 11, 8 10 11, 9 10 11 4 10 11 On Feb 7, 4:26 pm, atul anand atul.87fri...@gmail.com wrote: @vetri : yes right , include your sequence to my

Re: [algogeeks] Re: Microsoft :)

2011-08-19 Thread Vetri Balaji
@harshal: the link which u posted requires an invitation.. pls see to it On Mon, Aug 8, 2011 at 12:51 AM, KK kunalkapadi...@gmail.com wrote: @Harshal: Thanx -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

[algogeeks] Re: Amazon Aptitude questions

2011-08-04 Thread vetri
it's working fine on both dev and ideone.com On Aug 5, 12:13 am, Ankur Khurana ankur.kkhur...@gmail.com wrote: dev cpp par chal jaenge , ideone.com par try kar cp=cpp nahi chalega . . On Fri, Aug 5, 2011 at 12:40 AM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: i have a doubt

[algogeeks] puzzle

2011-07-27 Thread vetri
given a 6x6 matrix with all the elements as either 1 or -1. find the number of ways the elements can b arranged such that 1.the product of all elements of all columns is 1 2.the product of all elements of all rows is 1 can u pls post the answer if u no... -- You received this message because

[algogeeks] merge 2 sorted list into 1

2011-07-21 Thread vetri
question:given 2 sorted list: a's size=n and b's size=2*n but has only n elements. merge them into 1 single list. answer: i came up with dis but am gettin index out of bound exception. can u pls spot d mistake? import java.util.*; public class merge { static int a[],b[],size; public static

Re: [algogeeks] Re: Million Numbers

2011-06-10 Thread Vetri Balaji
@ankit: pls explain the time complexity.. i dont think its O(log n) On Thu, Jun 9, 2011 at 11:57 PM, ankit sambyal ankitsamb...@gmail.comwrote: @Dumanshu: In each iteration, we r removing the smallest number. If at any iteration we can't find the next smallest no., it means that no. is

Re: [algogeeks] Re: Million Numbers

2011-06-10 Thread Vetri Balaji
pahwa varunpahwa2...@gmail.com wrote: @ankit :please explain by taking an example. On Fri, Jun 10, 2011 at 12:13 PM, Vetri Balaji vetribal...@gmail.com wrote: @ankit: pls explain the time complexity.. i dont think its O(log n) On Thu, Jun 9, 2011 at 11:57 PM, ankit sambyal

Re: [algogeeks] Reverse the bits.

2011-06-10 Thread Vetri Balaji
int flip(int j,int k,int n) { int t1=(1j)-1; int t2=(1k)-1; t1=t2^t1; return n^t1; } correct me if im wrong On Fri, Jun 10, 2011 at 10:09 PM, Kunal Patil kp101...@gmail.com wrote: How about this??? * unsigned int flip_j_to_k_bits (unsigned int n,unsigned int j,unsigned int k) {

Re: [algogeeks] Reverse the bits.

2011-06-10 Thread Vetri Balaji
2,3,4.. i think just one change needed int t2=(1(k+1))-1; On Fri, Jun 10, 2011 at 10:22 PM, Vetri Balaji vetribal...@gmail.comwrote: int flip(int j,int k,int n) { int t1=(1j)-1; int t2=(1k)-1; t1=t2^t1; return n^t1; } correct me if im wrong On Fri, Jun 10, 2011 at 10:09 PM, Kunal

Re: [algogeeks] Re: Facebook Interview Question....Heavy Number

2011-04-05 Thread Vetri Vel
Hey , i m a new follower to this group.. i was actually looking for a nice group that would contain a nice challenge to sharpen the brain. and i finally ended with this group... i m happy to follo this group along with geeks like you. -- You received this message because you are subscribed to

Re: [algogeeks] If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-03-22 Thread Vetri Balaji
thanks!! On Wed, Mar 23, 2011 at 8:25 AM, Anand anandut2...@gmail.com wrote: Thanks!! On Tue, Mar 22, 2011 at 7:11 PM, D.N.Vishwakarma@IITR deok...@gmail.comwrote: thanx... On 3/22/11, Himanshu Neema potential.himansh...@gmail.com wrote: -- Forwarded message --

Re: [algogeeks] If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-03-22 Thread Vetri Balaji
is there any other books that can help in placements?? On Wed, Mar 23, 2011 at 9:25 AM, Gaurav Saxena grvsaxena...@gmail.comwrote: Thanks a lot. On Wed, Mar 23, 2011 at 8:41 AM, Vetri Balaji vetribal...@gmail.comwrote: thanks!! On Wed, Mar 23, 2011 at 8:25 AM, Anand anandut2...@gmail.com