MLE is so annoying...


  • 1
    B

    I have tried:
    vector<vector<vector<int>>> dp; --> MLE
    int dp[105][105][105]; --> run time error. (cannot allocate so huge memory)
    int dp[100][101][101]; --> Accepted.

    If I can, I prefer to use vector because elements are allocated to the heap (meaning that we can use more memory than C array whose elements are allocated to the stack).


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.