Give an algorithm for the following problem and determine


Problem

1. 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 subsists, each of size n/2, such that the difference between the sums of the integers in the two subsists is maximized. You may assume that n is a multiple of 2.

2. What is the time complexity T(n) of the nested loops below? For simplicity, you may assume that n is a power of 2. That is, n = 2 k for some positive integer k.

2158_Nested Loops.jpg

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Give an algorithm for the following problem and determine
Reference No:- TGS02634924

Expected delivery within 24 Hours