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.
Confirmed. Thanks. Was C# 12 added to Codwars last month (Nov '24)?
https://www.codewars.com/post/whats-new-on-codewars-november-2024
The OP wrote this question 5 months ago. I wanted to share the idea of identity-functions as an FP practice to anyone interested.
Order
should be already available on CW for kata which have been migrated to C# 12.Anyone remiss about not having Order can use OrderBy instead with an identity-function as the key-selector.
If you are so inclined, you can dig as deeply as you like into the implementations and overloads of these Order/OrderBy methods with the source that MS provides online. Be aware that Microsoft has gone to great lengths to make these perform well. Older, simpler implementations are available at Microsoft's reference-source site -- but these are frozen in time and won't include the latest things like this
Order
extension.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
Loading more items...