Google interview question

DSA question on heap, array, matrix, string