Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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.


In a bank there are two types of transactions: credit and debit. All transactions are assigned an alphabetical ID. Credit transactions are assigned a vowel and debit transactions are assigned a consonant. To track transactions over a year, all the transaction IDs are combined to form a string of IDs for each customer. A customer wishes to know the number of times he made a debit transaction immediately after a credit transaction.

Write an algorithm to print the count of debit transactions that were made immediately afte a credit transaction for that particular customer.

Input

The first line of the input consists of a string userString, representing the string of transaction IDs.

Output

Print an integer representing the count of det transactions made immediately after a credit

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.  

  1. What if the numbers could be negative as well? Can you think of an O(nlogn) solution in this case? (Hint: use sorting)  




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.



Create a console application for a club to record their member information. For each member to
need to store the member’s name and merit points. All new members starts with 0 merit points.
Implement class Member which has private attributes for Name and Points. You need to create at
a constructor method and the class also needs to have the following methods:

public string getName()
//Returns the name of the member
public int getPoints()
//Returns the points of the member
public void setPoints(int P)
//Sets the points of the member
In the application class (main method in the program.cs file), do the following:

 Create two instances of Member, for John and Susan
 Assign merit points to each of them
 Use an if statement to display the name of the member with the highest points.

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.

Note: Sentence has both lowercase and uppercase letters.Input

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.

Note: Treat uppercase letters and lowercase letters as same when comparing letters. Ignore spaces and quotes within the string.Input

The first line of input is a string.

Output

The output should be

True or False.Explanation

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.

Note: Treat uppercase letters and lowercase letters as same when comparing letters.Input

The first line of input is a string.

Output

The output should be the string

True or False.Explanation

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




LATEST TUTORIALS
APPROVED BY CLIENTS