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

You are given a square matrix A of dimensions NxN. You need to apply the below given 3 operations on matrix A. Rotation: It is represented as R S where S is an integer in {90, 180, 270, 360, 450, ...} which denotes the number of degrees to rotate. You need to rotate matrix A by angle S in the clockwise direction. The angle of rotation(S) will always be in multiples of 90 degrees. Update: It is represented as U X Y Z. In initial matrix A (as given in input), you need to update the element at row index X and column index Y with value Z. After the update, all the previous rotation operations have to be applied to the updated initial matrix. Querying: It is represented as Q K L. You need to print the value at row index K and column index L of the matrix A. Sample Input: 2 5 6 7 8 R 90 Q 0 1 R 270 Q 1 1 R 180 U 0 0 4 Q 0 0 -1 Sample Output: 5 8 8
Given polynomial write a prigram that prints polynomial in Cix^Pi + Ci-1x^Pi-1....+C1x+C0 format.


sample input:

4

0 5

1 0

2 10

3 6

sample output:

6x^3 + 10x^2 + 5


write a program to check the overlapping of one string's suffix with the prefix of another string


1.Sample input:

ramisgood

goodforall

Sample Output:

good

2.Sample input:

finally

restforall

sample input:

No overlapping




Triple Slash by CodeChum Admin Samurais are so awesome! I'd like to imitate their amazing sword skills some time but I just don't have the courage to harm myself, so I'd just like to print out three forward slashes (\) to digitally imitate the samurai's triple slash skill. Haha! Sounds easy, right? Then code it now! Output Three lines with a single backslash symbol. \ \ \
IPL Match Details Write a program that reads all the match outcomes and summarizes the information of all the matches. Points are given to the teams based on the outcome of the match. A win earns a team 3 points. A draw earns 1. A loss earns 0. The following information is expected: MP: Matches Played W: Matches Won D: Matches Drawn (Tied) L: Matches Lost P: Points The team information should be displayed in descending order of points.Input Names of teams may contain spaces but will be less than 24 characters 100 >= N >= 0 Sample Input 6 CSK;RR;loss RR;DD;draw MI;KKR;win KKR;RR;loss CSK;DD;draw MI;DD;draw Sample Output Team: RR, Matches Played: 3, Won: 2, Lost: 0, Draw: 1, Points: 7 Team: MI, Matches Played: 2, Won: 1, Lost: 0, Draw: 1, Points: 4 Team: DD, Matches Played: 3, Won: 0, Lost: 0, Draw: 3, Points: 3 Team: CSK, Matches Played: 2, Won: 0, Lost: 1, Draw: 1, Points: 1 Team: KKR, Matches Played: 2, Won: 0, Lost: 2, Draw: 0, Points: 0
Weekends Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2). The date in string format is like "8 Feb 2021".Input The first line of input will contain date D1 in the string format. The second line of input will contain date D2 in the string format.Output The output should be a single line containing two integers separated by space.Explanation For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are "30 Jan 2021" is a Saturday "31 Jan 2021" is a Sunday "6 Feb 2021" is a Saturday "7 Feb 2021" is a Sunday "13 Feb 2021" is a Saturday "14 Feb 2021" is a Sunday So the output should be Saturday: 3 Sunday: 3 Sample Input 1 25 Jan 2021 14 Feb 2021 Sample Output 1 Saturday: 3 Sunday: 3
Add two polynomials Given two polynomials A and B, write a program that adds the given two polynomials A and B. Input The first line contains a single integer M. Next M lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes co-efficient of Pi for polynomial A. After that next line contains a single integer N. Next N lines contain two integers Pj, Cj separated with space, where Pj denotes power and Cj denotes co-efficient of Pj for polynomial B. Output Explanation If M = 4 and for polynomial A For power 0, co-efficient is 5 For power 1, co-efficient is 0 For power 2, co-efficient is 10 For power 3, co-efficient is 6. If N = 3 and for polynomial B For power 0, co-efficient is 1 For power 1, co-efficient is 2 For power 2, co-efficient is 4. Then polynomial A represents "6x^3 + 10x^2 + 5", the polynomial B represents "4x^2 + 2x + 1" and the addition of A and B is "6x^3 + 14x^2 + 2x + 6"
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'. Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters. abcdefghij12345678910 klmnopqr1112131415161718 stuvwxyz1920212223242526Input The input will be a string in the single line containing spaces and letters (both uppercase and lowercase).Output The output should be a single line containing the secret message. All characters in the output should be in lower case.Explanation For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14"

Write a program that rolls a pair of dice until the sum of the number rolled is a specific number. we also want to know the number of times the dice are rolled to get the desired number. the smallest number or each die is 1 and the larges number is 6. so the smallest sum of the numbers rolled is 2 and the largest sum of the numbers rolled is 12. we use the random number generator, to randomly generate a number between 1 to 6.

A. Create a statement that randomly generates a number between 1 to 6 and stores that number into die1, which becomes the number rollled by die1

B. Similarly, create a statement that randomly generates a number between 1 to 6 and that number into die2, which becomes the number rolled by die2.

C. Next, determine whether sum contains the desired sum, then we roll the dice again.

D. Create a method named rolldice that takes as a parameter the desired sum of the numbers to be rolled and returns the number of times the dice are rolled to roll the desired sum.


Write a C++ program to read line of string as an input and do the following operation.Do proper input validation to your input. I) Capitalize first and last character of a each word in a given string. ,Ii) Delete a word from a given string. Pop-up a message if the string is empty. III) Add a word in middle of a given string.Capitalize the new word if it already exist.
LATEST TUTORIALS
APPROVED BY CLIENTS