Run time error could be anything, even if your solution passes all the test cases given in the problem state, it doesn’t imply it will pass other test cases. Try to generate some test base on the problem statement and check it against your solution. Unless you can come up with more specific question, no one are willing to do all the hard work and debug the code for you.