@rahul In Standard C you cant define a function inside another function but
you can declare a function inside another function. (so the function can be
defined outside the function).
Eg:-
#includestdio.h
void abc()
{
printf(bac);
void abf();
abf();
}
void abf()
{
printf(bas);
post the logic not the code!
BTW this problem can be done using segment trees.
http://community.topcoder.com/tc?module=Staticd1=tutorialsd2=lowestCommonAncestor
On Thu, Sep 6, 2012 at 4:51 PM, bharat b bagana.bharatku...@gmail.comwrote:
Its better to write an O(n) solution for this problem
we should use dp
On Fri, Jun 8, 2012 at 5:39 PM, Ratan success.rata...@gmail.com wrote:
Thats what the question is about to find the maximum subsequence.
i too tried your code with the sample 10,4,12,4,1,43,21,4,1,5,7,23,9
ur code gave the result 10 12 4 43 21
];
}
printf(Length of longest zig-zag subsequence is : %d\n,Max);
return 0;
}
On Fri, Jun 8, 2012 at 5:40 PM, srikanth reddy malipatel srikk...@gmail.com
wrote:
we should use dp
On Fri, Jun 8, 2012 at 5:39 PM, Ratan success.rata...@gmail.com wrote:
Thats what the question is about
hii supraja can u mail me the link for your blog plz.
On Sun, Mar 18, 2012 at 6:38 PM, Supraja Jayakumar suprajasank...@gmail.com
wrote:
Hi
Others are also welcome to comment on the code. If links are allowed in
algogeeks, I might send my wordpress blog link that explains this problem
in
{39,41,43,45}incremented by 2
{49,51,53,55}incremented by 2
{64,?,?,?}
first number in each set is considered as base number.
3 is for the number of numbers in each set other than base number.
so in final set base number is 64 and other 3 numbers are incremented by 2.
On Tue, Feb 28,
66,68,70
On Mon, Feb 27, 2012 at 6:54 PM, karthikeya s karthikeya.a...@gmail.com wrote:
3, 39, 41, 43, 45, 49, 51, 53, 55, 64, ?, ?, ...
(These are successive numbers sharing a common property. No math or
outside knowledge is needed.)
--
You received this message because you are subscribed