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.
Im a fool ((((
instantly humbled lol
Is the best possible solution, a linear time one. This is a classic, well known problem, for a in depth discussion see Richard Bird, THinking functionally in Haskell.
55555 I'm vegetable
WOW
wow
Add Haskell test framework pls OMO~~
What is the question? Why it fail?
It's not in proper order. The chellange is not only calculate position but also sort it. You can see everything in description and in example.
Basic test, no. 1
Log
[ { name: 'John', points: 100, position: 4 },
{ name: 'Bob', points: 130, position: 1 },
{ name: 'Mary', points: 120, position: 2 },
{ name: 'Kate', points: 120, position: 2 } ]
expected [ Array(4) ] to deeply equal [ Array(4) ]
edit: or were you actually asking for more fixed tests??
This comment is hidden because it contains spoiler information about the solution
Your solution is using recursion. It looks roughly correct, but will be very slow on large problem instances due to all the copying of data. Maybe you could use a non-recursive implementation of the same algorithm?
This comment is hidden because it contains spoiler information about the solution
eval
when you can write and execute the code directly?someString.replace(someRegex, someReplacement)
without assigning the result to a variable just leaves the original string unchanged.Best Practices with no doute
Loading more items...