• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
November 06, 2024 |90 Views

PROBLEM OF THE DAY : 05/11/2024 | Rotate by 90 degree

Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Kunal Jain We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Matrix but also build up problem-solving skills.

Given a square mat[][]. The task is to rotate it by 90 degrees in clockwise direction without using any extra space.

Examples:

Input: mat[][] = [[1 2 3], [4 5 6], [7 8 9]] Output: 7 4 1 
8 5 2
9 6 3
 

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/rotate-by-90-degree0356/1