Re: [algogeeks] zig zag problem

2011-12-19 Thread atul anand
@UTKARSH : it should be 1 4 3 7 6 why are you skipping 3 even when 143 is in zig zag sequence. On Tue, Dec 20, 2011 at 11:26 AM, UTKARSH SRIVASTAV wrote: > hi i want to know whether this is right > suppose array is : 1,4,3,2,7,8,6,2 > we just find where sign changes and take the first element

[algogeeks] Kth element of the Increasing Sequence

2011-12-19 Thread SAMMM
Given set of numbers( 0<= n<10 ) can contain duplicates . Now from this set we can generate an increasing sequence formed from the combination of number in the set . Now your task is to find the K th element element from the Increasing Sequence . For Example :- Given a Set S { 0 , 1 , 3, 1 } The I

Re: [algogeeks] Re: given a stream of numbers FIND MEDIAN

2011-12-19 Thread UTKARSH SRIVASTAV
http://www.geeksforgeeks.org/archives/14873 On Mon, Dec 19, 2011 at 12:17 PM, WgpShashank wrote: > @lucifier thought to post the same post , saw the post little bit late . > though other approaches exist ,its the most efficient till we have. > > nice job :) > > Thanks > Shashank > CSE, BIT Mesra

Re: [algogeeks] zig zag problem

2011-12-19 Thread UTKARSH SRIVASTAV
hi i want to know whether this is right suppose array is : 1,4,3,2,7,8,6,2 we just find where sign changes and take the first element of sign change and we can take last element. 1<4>3>2<7<8>6>2 so answer should be 1 4 2 8 2 correct me if i am wrong On Mon, Dec 19, 2011 at 12:26 PM, atul anand wr

[algogeeks] Re: doubt in TSUM

2011-12-19 Thread SAMMM
I am giving the link I found useful :- http://www.cs.iastate.edu/~cs577/handouts/polymultiply.pdf There are many other good links , try to google it . -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algog

Re: [algogeeks] Re: doubt in TSUM

2011-12-19 Thread prathamesh sonpatki
@ALL is there any tutorial on FFT in C/C++ ? On Mon, Dec 19, 2011 at 5:27 PM, SAMMM wrote: > @Atul--- > > > Read the Comment carefully . > I told :- > > "For finding the triplet we need to have a equation of the form : > f(x) ^3 + af(x)^2 + b f(x) . need to to find the cofficient of a > and

[algogeeks] Re: Can anyone help me with this problem

2011-12-19 Thread SAMMM
I think this question is discussed previously for Serialization U can go through it :- https://groups.google.com/group/algogeeks/browse_thread/thread/d95e792fbe1bfce0/4b7b12dc26ab2a5d?hl=en&lnk=gst&q=serialization#4b7b12dc26ab2a5d -- You received this message because you are subscribed to the Go

[algogeeks] Can anyone help me with this problem

2011-12-19 Thread Ankur Garg
Hi Can anyone help me with this question Code for Serializing and Deserializing a binary Tree -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, s

[algogeeks] Re: doubt in TSUM

2011-12-19 Thread SAMMM
@Atul--- Read the Comment carefully . I told :- "For finding the triplet we need to have a equation of the form : f(x) ^3 + af(x)^2 + b f(x) . need to to find the cofficient of a and b where f(x) is the polynomial formed from the elements in the given set. This method will suffice the time

Re: [algogeeks] Re: doubt in TSUM

2011-12-19 Thread atul anand
@samm : for FFT method :- i dont find it working for sum of 3. i.e f(x) * f(x) *f(x) , its not giving rite output. On Sat, Dec 17, 2011 at 9:56 PM, SAMMM wrote: > @All , > > The problm can be solved by Fast Fourier Transform . > The Concept used here is to Convert the number in the array into

Re: [algogeeks] Re: ACM-ICPC Kanpur 2011 LCM Extreme

2011-12-19 Thread Karthikeyan V.B
Hi, Facebook is conducting a Programming challenge through which u could get placed in it Pls login to ur account and visit Careers at the bottom and click Programming Challenge tab in it It's about 1 to 2 hrs. Some practise questions are also given... Regards, Karthikeyan.V.B PSG TECH, CBE -

Re: [algogeeks] zig zag problem

2011-12-19 Thread atul anand
@Ankur : yeah rite it wont work i have modified my algo and used many test cases , it is giving rite output. could you catch any test case for which it would fail. here is the updated code :- #include int findSeqLen(int arr[],int len,int subseq) { int i=0,flag1,flag2,toggle; int lastIndex=0