Matrix Sum

Programming Interview Medium 8 views
Back to Questions

Problem Description

Given {x}, Create Matrix class with add method. Output resulting matrix.

Input Format

First line r c. Next r lines matrix A. Next r lines matrix B.

Output Format

Matrix sum.

Sample Test Case

Input:
2 2 1 2 3 4 10 20 30 40
Output:
11 22 33 44

Constraints

r*c

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next