Visa Inc. interview question

Tree, Matrix and Linkedlist coding question.