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).



Give an algorithm for the following problem and determine its time complexity. Given a list of n ..

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

Post New Answer

More Engineering AllOther Interview Questions

what are register variables?what are the advantages of using register variables in c language?

0 Answers  


HELLO EVERYONE ON YAHOO , I'M IN NIGERIA AND I Will LIKE TO MOVE AND WORK IN CANADA , ANY SKILLED WORK IS OK BY ME AND THE PERSON WILL PAY THE BILL FOR IT, I WILL SERVE THE PERSON FOR THE EXPENSES.......... LOVE TO READ FROM YOU SOONEST AS YOU WISH TO HELP ME OUT

0 Answers  


Please send the details and fee for Intools training course..I would like to do the course in second week of jUNE 2010.

0 Answers  


what is 3d gard

0 Answers   HP,


Given two strings, find the sub-string of the first string having minimum length which is having all the characters in second string

0 Answers  






If a stored procedure is taking a table data type, how it looks?

0 Answers  


hey,,,hi have taken an emergency date of 21st july...i was continuously checking for dates n i was not able to get a normal date n my school is starting from 8th of september...so plz tell me can i get a rejection based on this, that i have taken an emergency date?????

0 Answers  


hi, please send me "state bank of india", last 5 years question paper with answers to my mail id.

0 Answers  


in header files whether functions are declared or defined in c language?

2 Answers  


write a program greater then three numbers without if, if...else,while,do..while,for,switch statement.

2 Answers   TCS,


What is the difference between wimdow Nt, 2000 amd 2003 server ?

1 Answers  


How would you design a gravity dam for holding back water?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)