Google interview question

2D array and Hashmap. Also recurssion