Give an algorithm for the following problem. 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 minimized. You may assume that n is a multiple of 2.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More AI Algorithms Interview Questions

What is greedy best first search algorithm?

0 Answers  


What is meant by uniform cost search algorithm?

0 Answers  


What is the uniform cost search algorithm?

0 Answers  


Draw a flowchart to find the average of four number?

0 Answers  


What are the complexities of sorting algorithms and how can this complexity be calculated?

0 Answers   Tech Mahindra,






Given a series of positive integers. Design an efficient algorithm that can detect pairs whose sum is equal to K such that K = ei + ej, and (i not equal to j).

0 Answers   Expedia,


There are numbers from 1 to n, which are inverted such that it results in numbers from n to 1. If only two consecutive numbers are stampled at a time and are inverted, how many moves are required?

1 Answers   IBM, TCS,


A* algorithm is based on which search method?

0 Answers  


Explain me what's your favorite algorithm, and can you explain it to me in less than a minute?

0 Answers  


What are the disadvantages of depth-first search algorithm?

0 Answers  


What is the breadth-first search algorithm?

0 Answers  


Tell briefly about the Banker's algorithm and what is it used for?

0 Answers   Impetus,


Categories