Test cases passed but wrong output in custom


#1

for this sample
14 5 8 10
6 9 15
2 3 6 6
output should be (8,6,6)=8-6=2
but its 8???


#2

Elements in the array should be sorted. The first array in your input is not sorted, that’s why you’re getting wrong answer.
Try using this test case, answer should be 1.
4 5 8 10 14
3 6 9 15
4 2 3 6 6