Memory Limit Exceeded!


#1

I’m using a 3d dimensional array with O(NNk) space complexity and I got a memory limit exceeded warning. Can I do better than this?


#2

yes. you can do better. You can use 3d array of O(2NN). How? Look at your recursive function.