plz help ,i don’t know why it is failing
Matrix queries-1
@nirajgusain5
Your code is absolutely fine. The problem lies in the returning and passing of matrix parameters. Because of the constant initialization and reinitialization, the program slows down significantly. When doing the query, you should send a matrix by reference and whenever you face a situation of complete overlap, you should multiply it then and there, so that the changes are made in the final answer and you do not have to return and pass matrices by value any more.
This is my code:
Go through it once and revert in case you face any difficulty.
If my doubt is able to resolve your query, please mark the doubt as resolved.