Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You have a bug in your code. Double check for invisible characters.
This comment is hidden because it contains spoiler information about the solution
Thanks a lot
This comment is hidden because it contains spoiler information about the solution
Nice kata, you do however need a negative test case as well as a test case that doesn't use
assert_equals
(Ruby) See @danielpclark's solution, which cheats your entire test suite.This comment is hidden because it contains spoiler information about the solution
Can you post your full solution as a spoiler comment?
@joshrainwater that's not an issue as it doesn't affect the test outcome and is just the character not rendering properly on the site. However, to get rid of the confusion I reduced the dimension for that test case so it renders correctly.
Could you please answer? In a 44 block, i have 12 spaces, and 3 newlines. In 55, 20 spaces, 4 newlines, Isn't that correct?
I've noticed in my test output, in the sample, there are a couple undefined characters mixed in the sample output somehow on the longer test that makes it fail.
■ □ ■ ��� ■ □ ■
Maybe that's causing issues? Is it a Unicode issue here as well maybe?
This is the output i get:
var res = string.split(" ");
document.write(res);
□,■,□,■ ■,□,■,□ □,■,□,■ ■,□,■,□
var res = string.split("\n");
document.write(res);
□ ■ □ ■,■ □ ■ □,□ ■ □ ■,■ □ ■ □
Isn't this what you ask for?
Check for extra white space or new line characters. From the description:
Hello,
It appears that i have the same issue. I'm writing with JS, and the output is the exact same of what's requested, but says not a match. The space, and new lines are in place.
Could you please see what's going on, or if you want, see my code?
Hi,
Python: I am getting timeout issue.. not sure why
when I run it on my system with below tests, it takes only <=500ms
print nextPrime(2,3)
print nextPrime(20,300)
print nextPrime(32144322,23452625233)
print gap(4,100,110)
print gap(4,30000,100000)
print gap(2, 10000000, 11000000)
print gap(2, 100000000, 110000000)
print gap(2, 10000000000, 11000000000)
print gap(2, 100000000000, 110000000000)
print gap(2, 100000000430000, 1100000000056450)
print gap(84, 432560923690632432, 93274782356043246324324)
I tried some hacks..
this fails as expected (None should equal [30109, 30113])
def gap(g, m, n):
if n > 11000:
return None
while, this times out
def gap(g, m, n):
if n > 110000:
return None
my script might not be meeting 6sec requirement, but I don't think it should fail like this.. especially as much bigger number on my system does within 500ms..
any suggestions?
Thanks
Loading more items...