Check Majority Element[Wrong answer-to be reviewed]
School Accuracy: 0.0% Submissions: 101 Points: 0
An element is a majority element if it appears more than (n/2) times in the array, where n is the total number of elements present in the array.
Given an array A of N integers and an integer X. You need to write a program which prints True if X is a majority element otherwise prints False.
First line of input contains an integer T which denotes the number of test cases. First line of each test case contains a single integers N where N is the size of array. Second lne of each test case contains N space separated integers. Third line of each test case contains a single integer X which denotes the element to be checked.
For each test case print True if X is a majority element otherwise print False.