Shouldn’t the end of the Declarative method be compared to needle.length instead of 3? Wouldn’t 3 only work for a needle array of only 3 elements since you are adding 1 for each match? Otherwise very interesting comparison.
Shouldn’t the end of the Declarative method be compared to needle.length instead of 3? Wouldn’t 3 only work for a needle array of only 3 elements since you are adding 1 for each match? Otherwise very interesting comparison.
Written by