Given an array arr of size N. The task is to find sum of of highest and lowest frequency of elements in the array.
Note: The lowest occurrence here for an element means 1.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. First line of each test case contains N, size of array. Second line contains N space separated elements.
For each test case, print the required result in new line.
5 2 2 1 2 3
Testcase1: The respective frequencies of the elements are as follows :-
The highest frequency is 3 and lowest is 1 so 3+1= 4 is the answer.