The leetcode test is executed correctly, but an error is reported when submitting
1. The phenomenon and solution are as shown below
2. Reason:
The two-dimensional array is not initialized to all 0s. As a result, the data is overwritten during testing, making the values of the two-dimensional array unstable.
3. Solution:
Variable initialization.
Be sure to initialize variables, arrays, etc.