Netradyne Interview Question

spiral matrix and a train–tracks timeline DSA question.