My issue
I am not able to find out here at which test case it is failing ?
According to me it is handling all the test cases correctly.
My code
# cook your dish here
# cook your dish here
t=int(input())
for i in range(t):
n=int(input())
l=list(map(int,input().split()))
l.sort()
c=0
for i in range(n):
if l[i]<=0:
c=c+1
if c%2!=0:
c=c-1
for i in range(c):
l[i]=abs(l[i])
d=0
for i in range(n):
d+=l[i]
print(d)
Problem Link: Maximise Sum Practice Coding Problem