Detail Form
We will send your result on your email id and phone no. please fill detail
You are given the following
Your task is to print the number of elements in that are greater than . You are given a total of such tasks.
Input format
Output format
For each task, print the number of elements of that are greater than .
Constraints
Given a linked list, the task is to complete the function maxPalindrome() which returns an integer denoting the length of the longest palindrome list that exist in the given linked list.
Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer N denoting the size of the linked list . Then in the next line are N space separated values of the given linked list.
Output:
For each test case output will be the required max length of the palindrome present in the given linked list.
User Task:
The task is to complete the function maxPalindrome() which should count the length of longest palindrome in the given list and return it.
Constraints:
1 <= T <= 100
1 <= N <= 100
Example:
Input:
2
7
2 3 7 3 2 12 24
5
12 4 4 3 14
Output:
5
2
Given a string 'str' of size ‘n’. The task is to remove or delete minimum number of characters from the string so that the resultant string is palindrome.
Note: The order of characters should be maintained.
Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer N denoting the length of string str.
The second line of each test case contains the string str.
Output:
Print the minimum number of characters to be deleted to make the string a palindrome for each testcase in a new line.
Constraints:
1<= T <=100
1<= N <= 1000
Example:
Input:
1
7
aebcbda
Output:
2