We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If true happens right at one of the jump points the current solution will return -1
test("two crystal balls", function () { const data = [ false, false, false, true, true, true, true, true, true, true, ]; const idx = 3; expect(two_crystal_balls(data)).toEqual(idx); expect(two_crystal_balls(new Array(821).fill(false))).toEqual(-1); });
We just need to modify the second loop in TwoCrystalBalls.ts like this
for (let j = 0; j < jmpAmount + 1 && i < breaks.length; i++, j++) { if (breaks[i]) return i; }
The text was updated successfully, but these errors were encountered:
or you could just j <= jupAmount. i guess you are right!
j <= jupAmount
Sorry, something went wrong.
I've been pulling my hair out on this one 😆 Yeah I ended up with the same j <= jumpIncrement
j <= jumpIncrement
No branches or pull requests
If true happens right at one of the jump points the current solution will return -1
We just need to modify the second loop in TwoCrystalBalls.ts like this
The text was updated successfully, but these errors were encountered: