Samsara Interview Question

Some Matrix operations moving values around according to some rules.