+1

Can anyone explain the time complexity of this code ??

https://code.sololearn.com/cg0DOmYCARIa/?ref=app

c

2/13/2020 4:58:24 PM

Subhankar Ghosh

1 Answer

New Answer

+1

O(1) You have a constant input size so it is hard to say anything is more than O(1). You process only 2 matrices and the matrices are always 2 by 2. Even though you have loops, those iterate only constant iterations. In other words, there is no "n" to relate the execution time to.