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

what is compiler

1865


Is Diesel staorage tank ( 800 litres) cleaning procedure is available with any body

1996


What is "strstream" ?

2119


successful command to make linux system as router in redhat-+

1956


what is the difference between verification and validation

2836


Explain Belady's Anomaly.

2340


what is the difference between composite key and primary key in sap abap

2609


hi i have selected for nda and could please send me the courses offered in nda regarding engineering and all other courses????

1835


what do you expect from this company?

2235


What kind of question can be asked at the time of Interview for State Bank Of India Clerical Interview

2098


which field is comparitively very best , today and in future while considering the following : ELECTRONICS [OR] NETWORKING

1817


what do you mean by CPU register?

2048


can oracle driver be directly connected with odbc driver??

1694


Can one be shocked holding a wire carrying a very large current with a low voltage source?

1975


how many E1's in pasolink and ipasolink?

1782