Amazon Interview Question

How to do a matrix transformation