intervie question
Anonymous User
232

Given an array with min length of 8, choose 2 groups of 2 numbers such that in each group, the two numbers must not be adjacent. Multiply the numbers in both groups and subtract one from other. Maximize this result
Ex: 2,1,3,4,8,6,7,9
2 groups -> 1,4 & 6,9 -> Diff = 54-4 = 50

Comments (3)