🎁 Exclusive Offer! Join our Telegram Channel to get **special discounts** and updates! 🚀

🚀 Struggling with coding interviews? We've got you covered! 💡 Practice real questions, sharpen your skills, and land your dream job! 🎯
Question 88 - 100% Working Solution | Buy Now

Description

12 Live
The longest diagonals of a square matrix are defined as follows: - The first longest diagonal goes from the top-left corner to the bottom-right corner. - The second longest diagonal goes from the top-right corner to the bottom-left corner. Given a square matrix, your task is to swap its longest diagonals by exchanging their elements at the corresponding positions. Example: matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Asked in: INFOTECH

Image of the Question

Question Image

All Testcases Passed ✔



Passcode Image

Solution


Please login to view the solution