Write a program to perform addition and multiplication for given two sparse polynomials. Create a node for each term in the given polynomial.
2. Write a program to perform transpose for a given sparse matrix. ( Row major order)
Note: The last date for submission is 03-9-2021
Note: Implementation can be done either in C or C++ for questions 1 and 2.
Harry loves numbers in the range [m1, m2] (m1 and m2 included). carry decides to gift harry an array of numbers for his birthday. harry wants to find the number of pairs of indices [l, r] for which the sum of all the elements in the range [l, r] lies between m1 and m2.
Harry loves numbers in the range [m1, m2] (m1 and m2 included). carry decides to gift harry an array of numbers for his birthday. harry wants to find the number of pairs of indices [l, r] for which the sum of all the elements in the range [l, r] lies between m1 and m2.
Now improvise this algorithm, assuming all numbers are positive integers.
Program that declares a three dimensional array to store the temperature of a month. The temperature is entered for morning, moon and evening for each day. The first dimension should be used to for three timings of a day, 2nd should be used for 7 days of a week and 3rd dimension should be used for four week of a month. The program should input the temperatures and then display the maximum, minimum and average temperature of a whole month.
Letter, Digit or Special Character
You are given a character as input. Check if the given input is a Lowercase Letter or Uppercase Letter or Digit or a Special Character.
Input
The first line of input is a single character N.
Explanation
In the given example character is
9. So, the output should be Digit.
Sample Input 1
9
Sample Output 1
Digit
Sample Input 2
A
Sample Output 2
Uppercase Letter
Remove Vowels in a Sentence
You are given a sentence. Write a program to remove all the vowels in the given sentence.
The first line of input is a string N.
Explanation
In the example given a sentence
Hello World, the sentence contains vowels e, o.
So, the output should be
Hll Wrld.
Sample Input 1
Hello World
Sample Output 1
Hll Wrld
Sample Input 2
Once upon a time
Sample Output 2
nc pn tm
Palindrome - 3
You are given a string, write a program to find whether the string is palindrome or not.
The first line of input is a string.
The output should be
In the given example, the string
No lemon no melon is a palindrome as we are ignoring spaces. So, the output should be True.
Sample Input 1
No lemon no melon
Sample Output 1
True
Sample Input 2
Race Cars
Sample Output 2
False
Palindrome - 2
You are given a string, write a program to find whether the string is palindrome or not.
The first line of input is a string.
The output should be the string
In the given example, the string
Madam is a palindrome as we are treating M and m as equal. So, the output should be True.
Sample Input 1
Madam
Sample Output 1
True
Sample Input 2
Treat
Sample Output 2
False