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.
Who knows... you can force the update by gaining more honor (complete another kata, upvote the one you completed), and the numbers shown in your profile should become correct.
For honor breakdown refer to this page.
CW sometimes doesn't update the numbers correctly. You should have the right number of honor.
I hope you found the solution
null
is not a String object, so you can't use.equals()
.You could also invert the order and use it, "needle" is a String object (it'll work that way).
That's not js, it is Java. The problem is with
.equals()
. Inverting the order also works.Almost 7000 people solved it in js, but it doesn't work for you. Really?!
@Chrono79 .. Thanks Diego
It is always an array, min length of 3 wasn't guaranteed tho, now it is.
This comment is hidden because it contains spoiler information about the solution
@chandlerroth Generally speaking you never post code without marking your post as a spoiler. So only people who've completed the kata will be able to see what you're writing. Anything that would really give away the answer or portions of the answer should be marked as a spoiler. It's okay to give people small hints and point them in the right direction, just not with actual code :)
@malahat niaz We'd have to see your code. With what you've told us all we can tell you is that it's because your code isn't correct; probably failing edge cases.
test cases are passing but over all attempt fails. why? Working in Python
No, read the description again, it would make no sense for a kata where you should return the same value no matter what the input is.
You don't need to pick the smallest digit to move it (
d
in the instructions). The returned number should be the small as possible.i
andj
small as possible is there for repeated digits.Please maybe you should read the description again and the comments if needed. Not only it was approved but, as you can see at the top of the page, 1098 guys passed the kata (202 with JS). Cheers.
@JavierHeisecke my pleasure! And @Chrono79 I will keep that in mind, thank you. What is the edicate here on spoilers, then?
If
arr[i]
is null,null[0]
(orarr[i][0]
) will throw the error you saw.Loading more items...