Practo Interview Question for SDE1s
- 1of 1 vote
Maximum Sum of Building Speed- uppubhai December 04, 2017 in India
You are the king of Pensville where you have 2N workers.
All workers will be grouped in association of size 2,so a total of N associations have to be formed.
The building speed of the ith worker is Ai.
To make an association, you pick up 2N workers. Let the minimum building speed between both workers be x, then the association has the resultant building speed x.
You have to print the maximum value possible of the sum of building speeds of N associations if you make the associations optimally.
First line contains an integer N, representing the number of associations to be made.
Next line contains 2N space separated integers, denoting the building speeds of 2N workers.
Print the maximum value possible of the sum of building speeds of all the associations.
1 3 1 2
| Report Duplicate | Flag | PURGE
Practo SDE1 Algorithm
Interview Type: Written Test
Open Chat in New Window