For Dev-C++, you have to include one file in another.
So either add *#include file1.c *in file2.c and compile file2.c or
add *#include
file2.c *in file1.c and compile file1.c.
Hope this helps.
*Neeraj Gangwar*
B.Tech. IV Year
Electronics and Communication IDD
Indian Institute of Technology
@ vishal :let array be {5,2,1,1} == as per u'r algo ={1,2},{1,5} are sets
difference is 3 .. but the sol is {5}{1,1,2} == diff = 1;
On Fri, Nov 16, 2012 at 10:12 AM, vishal chaudhary vishal.cs.b...@gmail.com
wrote:
Hi
Sorry for that as i misinterpreted the question.
for the difference to be
@Don : how can u say that a+b reduces by atleast 25% ..
in each iteration b won't be changed in (a+b). b just shifted to a. a gets
changed to a%b. == a+b will become at max 2b-1 .. we can't deduce any
relation between a+b to 2b-1.
why do we need the % of reduction on (a+b) in each iteration ?
@deepak : all the numbers in the array should be continuous or those k
elemenst can be any where ?
On Thu, Nov 15, 2012 at 2:18 PM, deepak mishra deepakmnni...@gmail.comwrote:
On Thursday, 7 July 2011 23:43:38 UTC+5:30, Piyush Sinha wrote:
Given an array of integers A, give an algorithm to
Sorry, I said that wrong. a+b is reduced by 25% over any TWO
iterations.
Look at these cases
2a = b : b % (a % b) a and 2*a = b, so b is decreased by at least
half, so a+b decreased by at least 25%
a b : b will become b-a, which is less than b/2, decreasing a+b
by at least 25%.
a==b :
I think that the problem specifies that the two arrays be of equal
size.
Don
On Nov 16, 9:12 am, bharat b bagana.bharatku...@gmail.com wrote:
@ vishal :let array be {5,2,1,1} == as per u'r algo ={1,2},{1,5} are sets
difference is 3 .. but the sol is {5}{1,1,2} == diff = 1;
On Fri, Nov 16,
I think its the stricter version of LIS , where when you see for the
increasing number , just see the number which is greater with the number k
than the previous one.
Thanks ,
Rajesh Pandey
On Fri, Nov 16, 2012 at 7:55 PM, bharat b bagana.bharatku...@gmail.comwrote:
@deepak : all the
but with adding it willl copy aalll the codewe we dont need to copy..if
we declare int i in file 1...and include in file 2..then i can use it in
file 2 with its extern declaration...m i ryt?
On Fri, Nov 16, 2012 at 2:42 PM, Neeraj Gangwar y.neeraj2...@gmail.comwrote:
For Dev-C++, you have
Think it this way
If you are compiling only one file in which you have declared variable as
intern, where would compiler find its actual definition because you are *not
compiling *the second file.
*file1.c : file in which variable is defined*
*file2.c : file in which variable is declared as
Yes, it would be like copying the code in the other file. You have to find
a way to do it in Dev-C++.
In linux it's simple. Just use *gcc file1.c file2.c *in terminal (as told
earlier).
If you are still confused, Think it this way
If you are compiling only one file in which you have declared
Ignore last to last mail. Sorry. Expand previous mail.
*Neeraj Gangwar*
B.Tech. IV Year
Electronics and Communication IDD
Indian Institute of Technology Roorkee
Contact No. : +91 9897073730
On Fri, Nov 16, 2012 at 11:49 PM, Neeraj Gangwar y.neeraj2...@gmail.comwrote:
Yes, it would be like
Ignore last to last mail. Sorry. Do show expanded content in last mail.
On 16 Nov 2012 23:49, Neeraj Gangwar y.neeraj2...@gmail.com wrote:
Yes, it would be like copying the code in the other file. You have to find
a way to do it in Dev-C++.
In linux it's simple. Just use *gcc file1.c file2.c
ok..thnxi got it.your r ryt n i m ryt too:)..thnx
On Fri, Nov 16, 2012 at 11:54 PM, Neeraj Gangwar y.neeraj2...@gmail.comwrote:
Ignore last to last mail. Sorry. Do show expanded content in last mail.
On 16 Nov 2012 23:49, Neeraj Gangwar y.neeraj2...@gmail.com wrote:
Yes, it would
you see, in each step of recursion, the number of digits in *n* is decrease
by one(at least in worst case), so the complexity you can decide.
On Tuesday, November 13, 2012 3:34:06 PM UTC+5:30, Shruti wrote:
hi
Can anyone help me find out the time complexity of recursive gcd algorithm
@Sonesh: Not so. The worst case for Euclid's algorithm is when the numbers
are consecutive Fibonacci numbers. So (89,55) -- (55,34) -- (34,21) --
(21,13) -- (13,8) -- (8,5), so it took 5 steps to reduce the number of
digits of the first number from 2 to 1. Asymptotically, the number of
digits
15 matches
Mail list logo