Why do I always get Runtime Error without any details

  • 4

    I tested my code on my own machine and it works fine. However, after submitting my code to leetcode, the result always says Runtime Error without any details. I don't know why this happens.

  • 0

    I have experienced similar problems; I was using indices that went outside the bounds of the matrix. Maybe this will help you in revising your code, and eliminate the errors.

  • 1

    In java it is legal to have "matrix = new int[0][4]" (one of the test case), this will cause matrix.length == 0. You need to handle this special condition to remove the runtime error.

  • 0

    Thank you yeyuancn, I had the same issue and your answer cleared it.

Log in to reply

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