Questions: 1 680

Answers by our Experts: 1 680

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 that prompt the user to input a four digit positive interger. The program then output the digit of the number, one digit per line. For example, if the input is 3245, the is

3

2

4

5

Thanks...


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.


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 debit transactions made immediately after a credit transaction.
You are given a roadmap of a country consisting of N cities and M roads. Each city has a traffic light. The traffic light has only 2 colors, Green and Red. All the traffic lights will switch their color from Green to Red and vice versa after every T seconds. You can cross a city only when the traffic light in the city is Green. Initially, all the traffic lights are Green. At a city, if the traffic light is Red, you have to wait for it to switch its color to Green. The time taken to travel through any road is C seconds. Find the minimum amount of time (in seconds) required to move from city 1 to city N.
It is guaranteed that the given roadmap will be connected. Graph won't contain multiple edges and self loops.
Input Format
The first line contains 4 space-separated integers, N (1 <=N<10
Write a program that prompts the user to input the x-y coordinate of a point in a Cartesian plane. The
program should then output a message indicating whether the point is the origin, is located on the x-
(or y-) axis, or appears in a particular quadrant. For example:
(0, 0) is the origin
(4, 0) is on the x-axis
(0, -3) is on the y-axis
(-2, 3) is in the second quadrant


Please it's urgent
Write a program to implement a searching algorithm on a skip list having two layers as
shown in below figure:
Assume that the linked list is already sorted. Write your observations on the time complexity of
the algorithm
Write a program to convert a sparse matrix from a 2D array into
A. An array representation of nx3 size, where n is the number of non-zero elements in the
sparse matrix and each element is represented by row, column, and data.
B. A chain list (Linked list representation of the sparse matrix where each non-zero element
is represented by a node containing the data, row, column, and a p
Write a program to transpose a sparse matrix represented as an array of nx3 size, as
mentioned in problem 1.A. The time complexity of the algorithm should be order of n and the
space complexity should be order of 1.
Due to a rush at the end of the exam, Professor could not arrange the answer sheets in the
sequence as desired. However, he mentioned the correct location of each answer sheet with it.
Now, Professor wants all the answer sheets in the desired sequence.
C language. Write a program that will accept a basic arithmetic problem from the user and solve each portion using various processes before returning the value to the parent process. Don't worry about the order of operations, for example:

Enter problem:

30 - 2 * 2 / 8 - 3

PID 20421 calculated 30-2 as 28

PID 20422 calculated 28*2 as 56

PID 20423 calculated 56/8 as 7

PID 20424calculated 7-3 as 4

Final result: 4

(program: only integers, no calculation greater than 255, use WEXITSTATUS(value) on exit for value)

Then implement another program with same math process with each calculation as a different single thread.

Unimart is offering a dhamaka offer. Terms and conditions to gain the offer as follows: Unimart will provide a shopping bag which you can carry W weight at maximum load. (If you try to load more than W weight then it will fall on the ground and you will lose the offer forever) Unimart has N < 10 products with weight w1, w2, w3...etc. You can get only 1 product for each item. Input: W N maximum weight and number of products. Find the set of products and their sum so that you can use the maximum weight of your bag capacity. N integers represent weight product P1, P2....Pn. Output: Print selected products set and the sum of these products. Sample Input: 10 4 8 9 2 4 20 4 10 7 4 5 90 8 23 10 1 7 2 3 4 5 Sample Output: 8 2 Sum: 10 10 5 4 Sum: 19 23 10 1 2 3 4 5 7 Sum: 55 Output product set sequence doesn't matter but you have to find the optimal sum of weight so that maximizes the profit.


LATEST TUTORIALS
APPROVED BY CLIENTS