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!
Hi,
I have found two bugs in
MaximumProductOfWordLengths.java
(leetcode/bit-manipulation/MaximumProductOfWordLengths.java) andRemoveDuplicatesFromSortedArray.java
(leetcode/two-pointers/RemoveDuplicatesFromSortedArray.java).In
MaximumProductOfWordLengths.java
line 20if(words.length == 0 || words == null)
ifwords
is null,words.length
will NPESimilarly in
RemoveDuplicatesFromSortedArray.java
line 12if(nums.length == 0 || nums == null)
ifnums
is null thennums.length
will NPE.I know they are minor issues. I would still be good if you can fix them. Thanks a lot!