Memory Space Makers
- Q. Write a program to print Fibonacci Series. (0, 1, 1, 2, 3, 5, 8, 13, 21).
- Q. Write a program in C to print the Pascal’s triangle
- Q. Write a program in C to accept an integer number and find the reverse of this number and check this number for palindrome. If the number is not palindrome then make it palindrome and print the output.
- Q. Pair sum in array
You have been given an integer array/list(ARR) and a number 'x'. Find and return the pairs in the array/list which sum to 'x'.
Given array/list can contain duplicate elements.
Input format :
The first line contains an Integer 'n’ which is size of the given array
Second line contains the elements of the said array.
Third line contains an integer 'x' whose sum pairs are desired.
Output format :
For each test case, print the all the number of pairs present in the array/list.
Output for every test case will be printed in a separate line.
0 <= N <= 10^4
0 <= num <= 10^9
Sample Input 1:
Enter size of array: 6
Enter elements of array: 1 5 2 4 3 3
Enter the number to check for sum pairs: 6
Sample Output 1:
Pair with a given sum 6 is (1, 5)
Pair with a given sum 6 is (2, 4)
Pair with a given sum 6 is (3, 3)
- Q. Are you sure you want to submit? (please check your answers before you click on YES)