human
Split array into K | Function to find the minimum sum of 2 nd smallest elements of each subset.
Sort the array.
Stores minimum sum of second elements of each subset.
Traverse first K 2 nd smallest elements.
Update their sum.
Prthe sum.
Driver Code.
Given Array.
Given size of the array.
Given subset lengths"
How can the above be solved in Python?
 Can you provide a code to split array into K and the other steps required?
assistant
#Here is code to split array into K and the other steps required.
 def findMinimum ( arr , N , K ) :
	arr = sorted ( arr )
	ans = 0
	for i in range ( 1 , 2 * ( N // K ) , 2 ) :
		ans += arr [ i ]
	print ( ans )
if __name__ == ' _ _ main _ _ ' :
	arr = [ 11 , 20 , 5 , 7 , 8 , 14 , 2 , 17 , 16 , 10 ]
	N = len ( arr )
	K = 5
	findMinimum ( arr , N , K )