Indeed. Thanks!

Fixed.

The error messages were wrong. Fixed.

Certainly not a "Best Practice"

I don't understand this test case. For str = '01124352345112302345234523045' and K = 13

Expected 3.Your fn returned 11 Which 3 are expected? There are four 1s and five 4s in the string

Expected 3.Your fn returned 11

Edit: Tried to return '3' for the above case and I get this one now: Expected 3.Your fn returned 3

Expected 3.Your fn returned 3

This comment is hidden because it contains spoiler information about the solution

What is wrong with "01" as a square?

Returning Infinity above the k cutoff itself already is pointless. It has nothing to do with finding squares in strings.

Infinity

k

"Do one thing, and do it well."

The return type as strings are... kinda pointless. Why not just numbers? JS's number type has both numbers and Infinity.

Please don't use Test.expect when Test.assertEquals will perform the tests just as well and has infinitely better feedback.

Test.expect

Test.assertEquals

Needs random tests

Index of (5,5) = (1,5) : Highest index = 5 Index of (3,7) = (3,4) : Highest index = 4 The pair with the lower value of highest index seems to be the answer

Indeed. Thanks!

Fixed.

The error messages were wrong. Fixed.

Certainly not a "Best Practice"

I don't understand this test case.

For str = '01124352345112302345234523045' and K = 13

`Expected 3.Your fn returned 11`

Which 3 are expected? There are four 1s and five 4s in the string

Edit:

Tried to return '3' for the above case and I get this one now:

`Expected 3.Your fn returned 3`

This comment is hidden because it contains spoiler information about the solution

What is wrong with "01" as a square?

Returning

`Infinity`

above the`k`

cutoff itself already is pointless. It has nothing to do with finding squares in strings."Do one thing, and do it well."

The return type as strings are... kinda pointless. Why not just numbers? JS's number type has both numbers and

`Infinity`

.Please don't use

`Test.expect`

when`Test.assertEquals`

will perform the tests just as well and has infinitely better feedback.Needs random tests

Index of (5,5) = (1,5) : Highest index = 5

Index of (3,7) = (3,4) : Highest index = 4

The pair with the lower value of highest index seems to be the answer