interviews icon indicating copy to clipboard operation
interviews copied to clipboard

NPE bugs in MaximumProductOfWordLengths.java and RemoveDuplicatesFromSortedArray.java

Open HermioneSW opened this issue 5 years ago • 3 comments

Hi,

I have found two bugs in MaximumProductOfWordLengths.java (leetcode/bit-manipulation/MaximumProductOfWordLengths.java) and RemoveDuplicatesFromSortedArray.java(leetcode/two-pointers/RemoveDuplicatesFromSortedArray.java).

In MaximumProductOfWordLengths.java line 20 if(words.length == 0 || words == null) if words is null, words.length will NPE

Similarly in RemoveDuplicatesFromSortedArray.java line 12 if(nums.length == 0 || nums == null) if nums is null then nums.length will NPE.

I know they are minor issues. I would still be good if you can fix them. Thanks a lot!

HermioneSW avatar Apr 09 '20 19:04 HermioneSW

Hi, can anyone please confirm and fix those bugs? Thanks so much!

HermioneSW avatar Apr 24 '20 04:04 HermioneSW

You need to create a pull request so the author can merge it directly.

wangpeipei90 avatar Apr 27 '20 15:04 wangpeipei90

Hi, Can I work on this issue?

divyani1997 avatar Oct 30 '20 11:10 divyani1997