diff --git a/Medium/rotate_image.cpp b/Medium/rotate_image.cpp new file mode 100644 index 0000000..3c454a8 --- /dev/null +++ b/Medium/rotate_image.cpp @@ -0,0 +1,18 @@ +//find rotate image +// Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] +// Output: [[7,4,1],[8,5,2],[9,6,3]] +// ques link- https://leetcode.com/problems/rotate-image/description/ +class Solution { +public: + void rotate(vector>& matrix) { + + int n=matrix.size(); + + for(int i=0;i