Community

Start a Thread


Notifications
Subscribe You’re not receiving notifications from this thread.

Would this not be a simpler solution?

Challenges • Asked about 6 years ago by rudebowski

rudebowski Commented on Jul 23, 2019:

For the detect substring in a string problem, here was the solution offered:

js
function detectSubstring(str, subStr) {
            let idxOfStart = 0,
                j = 0;

            for (i = 0; i
Team AlgoDaily Commented on Jul 27, 2019:

Hey rudebowski,

The point of the exercise was to avoid using the substring method, and to come up with it on your own. I'll edit the challenge to make that clearer!