TORONTO KIDS COMPUTER CLUB | PMCA Friday 19:00 Python Homework 21.03.26.
19218

# PMCA Friday 19:00 Python Homework 21.03.26.

## 29 Mar PMCA Friday 19:00 Python Homework 21.03.26.

Question for Sorting:

Question 1:

You are given an array A of non-negative integers of size m. Your task is to sort the array in non-decreasing order and print out the original indices of the new sorted array.

Example:

A= 4,5,3,7,1

After sorting the new array becomes A= 1,3,4,5,7

The required output should be “4 2 0 1 3”

Input Specification :
The first line of input consists of the size of the array
The next line consists of the array of size m

Output  Specification :
Output consists of a single line of integers
NOTE: The indexing of the array starts with 0.

`Sample Input54 5 3 7 1Sample Output4 2 0 1 3`

Quetion2:
A matrix of same rows and same columns is given .Sakshi wants to Sort the matrix in such manner that she will start from the first element and traverse the matrix in clockwise manner at the end she should be at the middle position with a largest element .Find the solution of Sakshi’s problem.

Input Specification:
First line will take the dimension of matrix i.e. N x N (only one input N).
Second input the elements of matrix.

Output  Specification :
Sorted Matrix in clockwise manner.

Constraints:
0<N<10

`Sample Input32 5 1222 45 551 6 8Sample Output1 2 545 55 622 12 8`