diff --git a/Code/C++/spiral_print.cpp b/Code/C++/spiral_print.cpp index 458c84432..27552390f 100644 --- a/Code/C++/spiral_print.cpp +++ b/Code/C++/spiral_print.cpp @@ -1,3 +1,13 @@ +/* + To print the elements of a 2D matrix in spiral order + Example: The given matrix is: + 7 3 4 + 2 6 9 + 4 7 8 + The spiral print order is: + 7 3 4 9 8 7 4 2 6 +*/ + #include using namespace std; @@ -82,4 +92,4 @@ int main() { 7 8 9 Output : 1 2 3 6 9 8 7 4 5 - */ \ No newline at end of file + */