Mobileye interview question

How to implement multiple matrix-scanning algorithms.