Print an NxM matrix with nw-se diagonals starting at bottom left corner.
Input
1 2 3 4 5 6 7 8 9 10 11 12
Output
9 5 10 1 6 11 2 7 12 3 8 4
C: Print the elements of a matrix in anti spiral order?
Input Matrix
1 2 3 4 5 6 7 8 9
5 6 9 8 7 4 1 2 3
Write a c program that rotate elements of an array by the value of configured number "n". For example: Input array[ ] = { 2, 3, 5, 6, 8, 9} value of n = 2 Output array[] = { 5, 6, 8, 9, 2, 3} I am looking for efficient program.
Given binary tree is:
1 / \ 2 3 / \ \ 4 5 6 / \ 7 8
The output should be 1, 2, 3, 4, 5, 6, 7, 8