Welcome to the daily solving of our PROBLEM OF THE DAY with Devashish Khare. 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.
In this problem, we are given a square matrix of size n*n. The task is to find the determinant of this matrix.
Example :
Input:
n = 4
matrix[][] = {{1, 0, 2, -1},
{3, 0, 0, 5},
{2, 1, 4, -3},
{1, 0, 5, 0}}
Output: 30
Explanation:
Determinant of the given matrix is 30.
Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/determinant-of-a-matrix-1587115620/1