Questions: 5 831

Answers by our Experts: 5 728

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

Rotate Matrix Rings
Given a matrix of order M*N and a value K, write a program to rotate each ring of th
The next M lines will contain N space-separated integers.
The next line will contain an integer, denoting K.
Output..The output should be M*N matrix by rotating the matrix by K elements.
Explanation...If the given K is 3. Rotate each ring of the matrix by 3 elements.
In the above matrix, the elements (1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5) is a ring, similarly, the elements (6, 7, 11, 10) will make a ring.
Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So the output should be 
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
Sample Input 1
4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3
Sample Output 1
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
Sample Input 2
3 4
1 2 3 4
10 11 12 5
9 8 7 6
2
Sample Output 2
9 10 1 2
8 11 12 3
7 6 5 4

sir give full answer to all test cases will be passed original output



Given a list of integers, write a program to identify the contiguous sub-list that has the largest sum and print the sum. Any non-empty slice of the list with step size 1 can be considered as a contiguous sub-list.Input


The input will contain space-separated integers, denoting the elements of the list.Output


The output should be an integer.


how to write the program for polynomials


how to write the matrix rotation program


how to find out the antidiagonal matrix


given string in camel case and convert the camel case to snake case


How to convert the string fro camel case to snake case


sir in the above question id #176334 some erorr ocurred your output should be show this type

(0, 12, 17)
(0, 8, 21)
(12, 8, 9)

but original out put this

Sample Input 1

0 12 17 8 9 21

29




Sample Output 1

(0, 8, 21)

(0, 12, 17)

(8, 9, 12)




Sample Input 2

0 1 2 3 5 7 13 17 19 19

22




Sample Output 2

(0, 3, 19)

(0, 5, 17)

(1, 2, 19)

(2, 3, 17)

(2, 7, 13)

sir in this question #177142  original output doesn't come how to solve this question

your output was come above code is





  a python
is language
is programming
language a
programming python
python language


but original out is

Sample Input 1

raju always plays cricket




Sample Output 1

always cricket

cricket raju

plays raju




Sample Input 2

python is a programming language




Sample Output 2

a language

a python

is language

is programming

language python

programming python




Sample Input 3

to be or not to be




Sample Output 3

be be

be not

or to

to to

sir above code correct #176332 i.e out put should be show

[13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14]

[[13, 9, 5, 1], [14, 6, 7, 2], [15, 10, 11, 3], [16, 12, 8, 4]]


but original output should be show this manner


Sample Input 1
4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3

Sample Output 1
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4

Sample Input 2
3 4
1 2 3 4
10 11 12 5
9 8 7 6
2
Sample Output 2
9 10 1 2
8 11 12 3
7 6 5 4


how to archive this



LATEST TUTORIALS
APPROVED BY CLIENTS