GUVI
Back

Array ,python doubt please help.

Created 3 mons ago
Codekata
27 Views
6 Comments
Gopika_Jayaram
@Gopika_Jayaram
Followers
Following
Posts
Gopika_Jayaram
@Gopika_JayaramProfile is locked. Login

Given a number N and an array of N integers, find the minimum sum of the maximum elements obtained by considering all consecutive pairs of adjacent elements after rearranging the array suitably.
Input Size : N <= 100000
Sample Testcase :
INPUT
5
1 2 3 4 5
OUTPUT
18

Comments (6)
Please login to comment.
 
Habitate.io