Thanks Nick, I am grateful that I landed on your video series, all the explanations are very helpful.
@pubamx4 жыл бұрын
This is an amazing explanation. I love your videos because I understand smoothly. Thanks Nick!
@otifelix4 жыл бұрын
best explanation so far
@Rob-J-BJJ Жыл бұрын
wow so simple yet so powerful
@dfnkt5 жыл бұрын
I did this one again in JS and had it passing. I decided to refactor it in a silly way by using a bunch of built-in methods and on my 4th execution it gave me a failure when I apparently pulled the test case where S was "___" and K was 3, it was expecting the output to be "" (empty string) when I returned "___". A test case of "___" seems to violate the number two note "String S consists only of alphanumerical characters(a-z and/or A-Z and/or 0-9) and dashes(-)". i.imgur.com/XZZJBqK.png Ignore the code here where I was just goofing off. The regex used in this case would be equal to "___".match(/.{1,3}/g); which chunks the string into a 1 element array where the sole element is a K length string.
@dfnkt5 жыл бұрын
Edit: The failing test case ended up being three dashes, I had to paste it out into an editor to see the difference. I fixed the offending case.
@abishekkachroo9385 жыл бұрын
But shouldn't be there any checking that if there is possibility of having these much groups ?