1.

You are given the following

  • An array \(A\) of size \(N\) 
  • An integer \(h\)

Your task is to print the number of elements in \(A\) that are greater than \(h\). You are given a total of \(K\) such tasks. 

Input format

  • The first line conains\(N\)denoting the size of the array.
  • The next line contains\(N\) space-separated integers denoting the elements of array \(A\).
  • The next line  contains an integer \(K\) denoting the number of tasks.
  • Next \(K\)lines contains an integer\(h\).

Output format

For each task, print the number of elements of \(A\) that are greater than \(h\).

Constraints

\(1\le N \le 10^5 \\ 1\le A[i] \le 10^9\\ 1\le K \le 10^5 \\ 1\le h \le 10^9 \)
 

2.
Consider a game where a player can score 3 or 5 or 10 points in a move. Given a total score n, find number of distinct combinations to reach the given score.
Input:
The first line of input contains an integer T denoting the number of test cases. T testcases follow.The first line of each test case is n.

Output:
For each testcase, in a new line, print number of ways/combinations to reach the given score.

Constraints:
1 ≤ T ≤ 100
1 ≤ n ≤ 1000

Example:
Input

3
8
20
13
Output
1
4
2

 
3.
Given two numbers A and B. Your task is to return the sum of A and B.

Example 1:
Input:
A = 1, B = 2
Output:
3
Explanation:
Addition of 1 and 2 is 3.
 

Example 2:
Input:
A = 10, B = 20
Output:
30
Explanation:
Addition os 10 and 20 is 30.
4.

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

5.

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