Amazon interview question

Second round, paper coding questions were... 1. Find the common leaf node that is common for two binary tree. 2. Given a 2D array of 1's and 0's convert all the cells of row and column into 1's whose particular cell is 1. Technical round: Optimize the solution provided in the second round. Questions from almost all data structures like stack, queues, trees, trie, sorting, searching etc,