Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, I am preparing for Assistant Motor Vehicle Inspector (AMVI) exam.If any body having old question papers please send.My mail id is siyadndd@gmail.com

2234


what are the efficient way or solutions to avoid ABEND=S04C.

6521


find the salary of an employee where employee number is known

1980


please explane me clusterd and non clusterd

2061


what is difference between shell commands and shell scripting commands or both r same?

2124


what is debugging?

2084


What is the use of generics? when was it added to jdk?

2143


Write a test case plan for a typical banking application which involves functionalities like Balance enquiry, deposit, fund transfer etc. Make your assumptions and mention the same in your answer sheet.

2423


what is the diffeence between SQL and ORACLE?

1903


what we have to say about hobbies,strong points,weak points

2280


what is the advantage of msil in c#

2733


How I can write a java program output the following 1+2+4+7+......N

1962


hi,i just want to know the best institute to learn oracle in bangalore because i am doing my BE there?

1878


what is technical voice process and define it

3102


What is the meaning of "co relation" and what is the value of "co relation" in the performance testing environment.

2059