https://www.acmicpc.net/problem/11497
import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
n = int(input())
l = list(map(int, input().split()))
l.sort()
level = [0] * n
for i in range(n):
if i % 2 == 0:
level[i // 2] = l[i]
else:
level[- i // 2] = l[i]
answer = 0
for i in range(n):
answer = max(answer, abs(level[i] - level[i - 1]))
print(answer)