LeetCode-Swift icon indicating copy to clipboard operation
LeetCode-Swift copied to clipboard

Fix `Fatal error: Index out of range` issue when matrix is empty And one typo

Open SunsetWan opened this issue 4 years ago • 1 comments

The old version of the solution to 304. Range Sum Query 2D - Immutable didn't cover the case that the input matrix is empty. When the input matrix is empty, the result will be "Fatal error: Index out of range".

SunsetWan avatar Apr 09 '20 07:04 SunsetWan

image

SunsetWan avatar Apr 10 '20 07:04 SunsetWan

Looks good to me, thanks for the contribution!

soapyigu avatar Aug 24 '22 19:08 soapyigu