Amazon | Online Assessment | Interview Question
Anonymous User
5986

Question about storage, it was simple but very hard to implement, and here it is.
Create a function that takes in a matrix, and an array of rows and an array of columns to be removed from the matrix, and return the size of the biggest cubic space after removing the shelves and columns. I hope this makes sense.

biggestStorage(matrix, rows, columns)
	return biggestCubicSize; // i.e. 3x4 = 12

I was able to solve the examples given with some dynamic programming, but all my other test cases failed due to the large inputs, very large, like in the 10s of thousands of rows for a given matrix.
I hope someone is able to shed some light on this problem, I searched everywhere and could not find a similar problem, nor solution.

!!! UPDATED
Solution can be found here.
Thanks @Lollipop3

Comments (12)