String Concatenation
Disha has three strings A, B, and C consisting of lowercase letters.She also has a string T consisting only of characters 1, 2 and 3.
She wants to concatenate the three strings according to the characters in T.
Your task is to print the final output string.
Note: Formally, follow the below instructions:
* For each integer i such that 1<=i<=|T|, let the string si be defined as follows:
*Concatenate the strings s1,s2,...,s|T| in this order and print the resulting string.
Sample Input1
mari
to
zzo
1321
Sample Output1
marizzotomari
Unique Matrix
You are given a N*N matrix. write a program to check if the matrix is unique or not. A unique Matrix is a matrix if every row and column of the matrix contains all the integers from 1 to N
Input
The first line contains an integer N.
The next N lines contains N space separated values of the matrix.
Output:
The output contains a single line and should be True if the matrix is unique matrix and False otherwise.
Sample input:
4
1 2 3 4
2 3 4 1
3 4 1 2
4 1 2 3
Sample output:
True
Sample Input2
4
1 2 3 3
2 3 4 1
3 4 1 2
4 1 2 3
Sample Output
False
Scoring
A group of people(P) are playing an online game. Their scores are stored in the order of their entry time in S. Each integer S[i] corresponds to the score of the person Pi.
For each person Pi you have to report the number of people who played after the person and scored less than the person.
Input
The first line contains a single integer N.
The second line contains N space-separated
Output
The output should contain N space-separated integers representing the number of people who played after the person and scored less than the person.
Explanation
Given S = 13 12 11 Score of P1 is 13. Score of P2 is 12. Score of P3 is 11.The number of people who played after P1 and scored less than 13 is 2(12, 11). The number of people who played after P2 and scored less than 12 is 1(11). The number of people who played after P3 and scored less than 11 is 0.The output is 2 1 0.
Sample Input 1
3
13 12 11
Sample Output 1
2 1 0
Sample Input 2
4
4 3 5 2
Sample Output 2
2 1 1 0
identify the possible modes through which consultant and client relate to each other.
Game
There are N people in a party numbered 1 to N. Sruthi has K cards with her. Starting with person A, she gives the cards one by one to the people in the party in the numbering order: A, A+1, A+2, . .., N, 1, 2,..., A-1. Your task is to output the number of the person who will get the last card.
Input
The only line of input contains space separated integers N, K and A.
Output
print the number representing the person who will get the last card.
Explanation
Given N=3, K=3 and A=2.
Distribution of cards starts from 2. The final order of person is 2,3,1.
The last person to get the card is 1.
Sample Input1
3 3 2
Sample Output1
1
Sample Input 2
1 100 1
Sample Output2
1
Translate these statements into English, where C(x) is “x is a comedian” and F(x) is “x is funny” and the domain consists of all people.
a) ∀x(C(x) → F(x))
b) ∀x(C(x) ∧ F(x))
c) ∃x(C(x) → F(x))
d) ∃x(C(x) ∧ F(x))
Briefly explain and differentiate the following development methods: Joint application
development and Rapid application development.
A wheel rotates with a constant angular acceleration of 3.5 rad/s2. If the angular speed of the wheel is 2 rad/s at t = 0, Find what angle does the wheel rotate between t = 0 and t = 2 s ?
Pattern Printing
Given the number of rows N, write a program to print the hallow diamond pattern similar to the pattern shown below.
A
B B
C C
D D
E E
D D
C C
B B
AInput
The input will be a single line containing a positive integer (N).
Output
The output should be (2*N - 1) rows and (2*N - 1) columns containing the alphabet characters in the hollow diamond pattern.
Explanation
For example, if the given number is 5, the pattern should contain 9 rows and 9 columns as shown below.
A
B B
C C
D D
E E
D D
C C
B B
ANOTE:
NO SPACES ON LEFT SIDE FOR DIAMOND
How many ml of 1.2 M H2SO4 are required to neutralize 25.0 ml of 1.5 M NaOH?