Closed CarolLuca closed 1 year ago
Merging #523 (55a7ae2) into main (1aa53bf) will increase coverage by
0.011%
. The diff coverage is100.000%
.
See, https://app.codecov.io/gh/codezonediitj/pydatastructs/pull/523/blob/pydatastructs/strings/algorithms.py. L206 and L231 are not tested. When query = ""
, do we even need to do any kind of processing. In KMP we just do, return DynamicOneDimensionalArray(int, 0)
if, text
or query
is empty. Why can't we do that in your implementation?
See, app.codecov.io/gh/codezonediitj/pydatastructs/pull/523/blob/pydatastructs/strings/algorithms.py. L206 and L231 are not tested. When
query = ""
, do we even need to do any kind of processing. In KMP we just do,return DynamicOneDimensionalArray(int, 0)
if,text
orquery
is empty. Why can't we do that in your implementation?
I see that the case is treated. The _z_vector() function doesn't do this because the actual vector it is often used also without a query, but for the _z_function(), I see I implemented the case when the lengths of the strings are zero. If I'm wrong please correct me, I might have missed something.
I added an implementation of the Z-function of a string (also known as the Z-algorithm).