This comment is hidden because it contains spoiler information about the solution
actually i counted 4 opens as 2 separate pairs...thanks for the help
opeN OPeN Open oPEN // 1
sUm SuM sum // 2
evAl EvAl // 3
sum sum sum // 4
Your answer is wrong, read the description again, those two oct don't count.
opeN OPeN Open oPEN sUm SuM sum hex evAl EvAl oCT Next rEVeRseD diVmoD sum sum sum OCT
for the test case expected: 4 actual: 5
My ansr was correct but it's not working for a lot of test cases
Ah, thank you - I misunderstood. Of course, I'll just console.log(searchString). I expected it to be part of the test output but that's fine. Thank you.
Use console.log() to print the input and check it in the output panel, it'll appear above the test result.
No, for example, 102 of the random tests are passing, but 3 fail. All it says is ""Expected: 4, instead got: 3" - what was passed in that particular test to the function? I can see the parameters for the basic tests but not the random ones.
You can print function params to the console. Anything you print to stdout will be visible in test output panel.
try to use console.log() on the random tests that fail and according to it see the bug in your code.
Ruby translation kumited -- please check and approve (note: author is inactive)
Reversed isn't repeated in a row, they're far apart, so that doesn't count. See this example:
"apple dog apple dog cat" --> 0
in js random tests, can you explain why "Super BytEs rEVErSEd priNt divmoD reVersEd nexT next OCt OcT oct asCIi COmPlEx" expects 2 while repeated words are [ 'reversed', 'next', 'oct' ]
See how many of those words are repeated in a row :
Those are 5.