My orders
How it works
Examples
Reviews
Blog
Homework Answers
Submit
Sign in
How it works
Examples
Reviews
Homework answers
Blog
Contact us
Submit
Fill in the order form to get the price
Subject
Select Subject
Programming & Computer Science
Math
Engineering
Economics
Physics
Other
Category
C++
Software Engineering
Java | JSP | JSF
Databases | SQL | Oracle | MS Access
C
Python
Excel
C#
Visual Basic
Computer Networks
Functional Programming
Android
Assembler
UNIX/Linux Programming
ASP | ASP.NET
MatLAB
Wolfram Mathematica
MathCAD
Maple
Perl
Action Script | Flash | Flex | ColdFusion
Ruby | Ruby on Rails
Prolog
Objective-C | Swift
Algorithms
Web Development
HTML/JavaScript Web Application
NodeJS Web Application
Other
Deadline
Timezone:
Title
*
Task
*
{"ops":[{"insert":"Matrix Rotations\nYou are given a square matrix A of dimensions NxN. You need to apply the below given 3 operations on the matrix A.\n\nRotation: 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 the matrix A by angle S in the clockwise direction. The angle of rotation(S) will always be in multiples of 90 degrees.\n\nUpdate: 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.\nAfter the update, all the previous rotation operations have to be applied to the updated initial matrix.\n\nQuerying: 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.\n\n Input\n\nThe first line contains a single integer N.\nNext N lines contain N space-separated integers Aij (i - index of the row, j - index of the column).\nNext lines contain various operations on the array. Each operation on each line (Beginning either with R, U or Q).\n-1 will represent the end of input.\n\nOutput\n\nFor each Query operation print the element present at row index K and colum index L of the matrix in its current state.\n\nExplanation\n\nFor Input:\n2\n1 2\n3 4\nR 90\nQ 0 0\nQ 0 1\nR 90\nQ 0 0\nU 0 0 6\nQ 1 1\n-1\n\nInitial Matrix\n1 2\n3 4\n\nFor R 90, clockwise rotation by 90 degrees, the matrix will become\n3 1\n4 2\n\nFor Q 0 0, print the element at row index 0 and column index 0 of A, which is 3. \nFor Q 0 1, print the element at row index 0 and column index 1 of A, which is 1. \n\nAgain for R 90, clockwise rotation by 90 degrees, the matrix will become\n4 3\n2 1\n\nFor Q 0 0, print the element at row index 0 and column index 0 of A, which is 4. \n\nFor U 0 0 6, update the value at row index 0 and column index 1 in the initial matrix to 6. So the updated matrix will be,\n6 2\n3 4\nAfter updating, we need to rotate the matrix by sum of all rotation angles applied till now(i.e. R 90 and R 90 => 90 + 90 => 180 degrees in clockwise direction).\nAfter rotation the matrix will now become\n4 3\n2 6\n\nNext for Q 1 1, print the element at row index 1 and column index 1 of A, which is 6. \n\noutput \n3\n1\n4\n6\n\nSample Input 1\n2\n1 2\n3 4\nR 90\nQ 0 0\nQ 0 1\nR 90\nQ 0 0\nU 0 0 6\nQ 1 1\n-1\n\nSample Output 1\n3\n1\n4\n6\n\nSample Input 2\n2\n5 6\n7 8\nR 90\nQ 0 1\nR 270\nQ 1 1\nR 180\nU 0 0 4\nQ 0 0\n-1\n\nSample Output 2\n5\n8\n8\n\ni want exact sample outputs sir\n"}]}
I need basic explanations
Special Requirements
Upload files (if required)
Drop files here to upload
Add files...
Account info
Already have an account?
Create an account
Name
*
E-mail
*
Password
*
The password must be at least 6 characters.
I agree with
terms & conditions
Create account & Place an order
Please fix the following input errors:
dummy