Skip to content

AIS-UCLA/cs-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Intro Fellowship Application Coding Challenge 

Challenge: Matrix Multiplication!

Write some code in your favorite programming language (Python preferred) that
first reads a value N from standard input, then reads 2 N x N matrices also from
stdin, multiplies them together, and subsequently writes the resulting matrix
to stdout. Please use the `test.py' to make sure that your solution correctly
interacts with standard out. Additionally, please avoid using built-in matrix
multiplication functions or third-party libraries. Although languages such as
Julia and MATLAB, or Python's numpy library, can already perform these tasks,
avoid using these: instead write the matrix multiplication function yourself.
To be clear, your main concern is that your code is correct. Bonus points for
making your code efficient (ie. cache-friendliness), though not required at all. 

Note that the new program you create (e.g `matmul.cpp`, `matmul.py`) should also
be in the same folder as the test script.

Good luck, and have fun!

A sample input would be:

3
0 1 2
3 4 5
6 7 8
1 0 0
0 1 0
0 0 1

For which the output should be:

0 1 2
3 4 5
6 7 8

Run the test harness with `python test.py YOURPROGRAMHERE`.

About

Computer Science Challenges for Intro Fellowship Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages