Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Code/C++/wave_print.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
To print the elements of a 2D matrix in wave order, i.e. print the first column elements in top to bottom order the next column bottom to top and so on
Example: The given matrix is:
7 3 4
2 6 9
4 7 8
The wave print order is:
7 2 4 7 6 3 4 9 8
*/

#include<iostream>
using namespace std;

Expand Down Expand Up @@ -51,4 +61,4 @@ int main(){
7 8 9

Output : 1 4 7 8 5 2 3 6 9
*/
*/