Give an algorithm for the following problem and determine
its time complexity. Given a list of n distinct positive
integers, partition the list into two sublists, each of
size n/2, such that the difference between the sums of the
integers in the two sublists is maximized. You may assume
that n is a multiple of 2 (i.e. n is even).
Answer / ali
In the case of T(n) = n, say O(n), and n is 1000, then on
the old computer 1 minute and the new one, 1/1000 minute
For T (n) =n3, the size will be 1000^3 = 1000,000,000 which
takes 1000,000 minutes on the old computer and 1000 on the
new one
For T(n)=10n Because of the limited space, I won’t write
1000 ZEROs here, instead it’s clear that it takes 10^997
minutes on the old computer, and 10^994 minutes on the new one.
| Is This Answer Correct ? | 3 Yes | 19 No |
c ka base kya hota hai? what is communication?
I have cleared SBT clerk exam and having interview on 29.I have completed my B.tech in IT.I would like to know the types of questions asked in the interview.
hi friends i am first time using this site.i came to by some tcs personals that certifications r important for placements.i am financially average i am learning java from books.please tell is it enough if not which certification should i go for
what is far pointer?
what is dedicated earthing??????
3 Answers APC, ElectroMech, Emerson, JLL, JP Group, Tata Liebert,
2. A product selected for testing is equally likely to have been produced by one the 6 machines/processes. (i) Determine sample space ‘S’ (ii) What is the probability that the product is from machine 1? (iii) What is the probability that the product is from machine 2 or machine 4? (iv) What is the probability that the product is from both machine 5 and machine 3? (v) What is the probability that the product is not from machine 6? (vi) What is the probability that the product is not from either machine 6 or machine 1?
Hi,am being graduated as BE in MECHATRONICS engineering and now experienced work in mechanical stream for 1.5 years.If am trying for a job in mechatronics what are the fields do i need to be known well and is there any companys who requires a MECHATRONICS ENGINEER.
am a textile eng. frombut with major of my course including chemical eng, subjects, can i too apply to the co.?
What is Thermal impedance?
how to write a test case for ATM perday you take atleast 500& not more than 5000 (not for ATM passward&username)
what is the address bus length of an 8086 microprocessor?
how to avoid a class from getting inherited but respective class should be able to instantiate ?
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)