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 |
i am Ali from Hyderabad,having twice rejected on conference visa(USA),possessing 9 years of teaching experience,my current ielts score is 6 bands and my current age is 34,do suggest me some suitable universities for MBA course in USA,and what are the prospect of getting a visa.
How to freely move a ball in graphics mode.
program for inter process communicatin using message sharing in unix c
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.
what is recursion in c language?
As stated in the job offer notification, is our basic salary of $7,500.00USD, good for you if employed? In case of any eventuality, who is your next of kin?
hi... i just want to know that how could join the AAI with an B.E back ground??? please help me out.
0 Answers AAI Airports Authority Of India,
What is IPSec?
many people believe that only way in which the order of magnitude and improvements in software quality and productivity will be achieved is through component based development.Is this statement true or false?
what is test strategy
W.A.P to take input of an array and display the entered no. in dos.
Suppose 100 SRS are there. & 100 test cases are there. How can we check that wheather a particular field has been tested or not.
Civil Engineering (5086)
Mechanical Engineering (4453)
Electrical Engineering (16638)
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)