The Trade Desk interview question

matrix manipulation, leetcode mediums (near hard level)