Skip to content

Create reverse_wave_print(2D arrays).cpp - #1

Open
codewithrohan wants to merge 1 commit into
WasimAkhtarKhan:masterfrom
codewithrohan:patch-1
Open

Create reverse_wave_print(2D arrays).cpp#1
codewithrohan wants to merge 1 commit into
WasimAkhtarKhan:masterfrom
codewithrohan:patch-1

Conversation

@codewithrohan

Copy link
Copy Markdown

In this problem, we are given a matrix. Our task is to print the matrix in reverse waveform in a single line.

This example will make the problem clear,

Input:
1 4 6 11
2 5 8 54
7 9 3 43
1 7 4 34
Output: 11 54 43 34 4 3 8 6 4 5 9 7 1 7 2 1
To solve this problem, we have to print the reverse waveform of our matrix and for this, we will print the elements of the last column in the downward direction and then second-last column’s elements in upward and so on this the first column of the array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant