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 after a credit transaction for that particular customer
2. There is a binary tree given to you. In which each of the node represents the student in the class. You are playing a game in which you need to team up with one of student in class. Team can be formed in such a way that in a team both of the students can’t have same parent in tree and should be at the same level in binary tree. The number of students in the class is denoted by ‘n’. The value will be user-defined.
Input: we have given you some pair of students you need to find that is the team valid or not.
Output: ‘Yes’ if the team is valid or ‘No’ if the team is invalid.
Also, Find
(a) How many tree traversal is required for the solution of the above problem
The media company global ad
Write a program that display the sum of all odd numbers between a and b (inclusive). Where a and b are inputs from the user.
Thank you.