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.
at the bottom of the documentation for Order(), it is written:
checking .NET version on Codewars:
You're likely looking for the
OrderBy
method instead.If you Google "linq order enumerable" you'll find this kind of information easily :)
Your code runs on your pc, in Java I suppose?
toString
andtoCharArray
are Java method names, not C#. Please have a look at C# reference guide: https://learn.microsoft.com/en-us/dotnet/api/system.int64.tostring?view=net-8.0may you send your code
This comment is hidden because it contains spoiler information about the solution
Is it just efficiency or is it that you've made the nature of the random tests completely different from the basic? For example, the random arrays have some with 2,1,1 of the same element. You put no such examples in the basic and wrote nothing of what should be done in that scenario in the description. EDIT: Okay I solved it, forgive me for questioning your infinite wisdom ;)
Read other posts about it, it's a floating point representation problem.
I agree, this seems broken.
The most challening task is to be able to detect a pattern. If the string is split into smaller pieces and these pieces are consecutive to eachother you might have found a pattern. Once you have the pattern you can calculate the position of the first number of the pattern. I am trying to help without spoling the kata.
By the way, myjinxin2015, this is one of the mosy singular and challenging katas I have done. Congratulations. Keep it up!
I solved the JavaScript one just now. No problems. NB: there is no need to repeat the same comment 3 times.
This comment is hidden because it contains spoiler information about the solution
Perhaps you can starting from this kata, which is simpler one:
https://www.codewars.com/kata/challenge-fun-number-8-numbers-concatenation/discuss#5abccc77a88ee7496a0000cb
I managed the pass the shorter ones, but the ones with result being higher than 10^9 beats me in performance, it gets very slow (~45s).
A hint for you: you don't have to track of the whole huge string, only the part you have to examine, and you have a limit for that.
You need efficient code.
You should not modify the original array.
Loading more items...