Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Multiply two matrices represented as arrays of arrays.

Hard

Problem Statement

Multiply two matrices represented as arrays of arrays.

Sample Input

[[1, 2], [3, 4]] * [[5, 6], [7, 8]]

Sample Output

[[19, 22], [43, 50]]

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def matrix_multiply(a, b) # Your code here end
Log in or sign up to run or submit your code.Log inSign up
Input
[[1, 2], [3, 4]] * [[5, 6], [7, 8]]
Expected Output
[[19, 22], [43, 50]]