Microsoft interview question

Questions from linked list and tree