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.
Please provide more clarity in the description:
I though you meant to maximize the distance to the nearest person, but that's not the case in the example.
Are we meant to maximize the 'average' distance, or use some other metric?
This comment is hidden because it contains spoiler information about the solution
In the future you might want to add more cards, even if they are recognized in a different way.
So it's best to make a separate function for each, this way you won't have to restructure your code later.
Best solution IMO because it doesn't pre-compute a list of random numbers.
So this is more scalable and likely faster
Elegant, but not best practice because iterative solutions should be preferred over recursive ones.
Wow this is my first time hearing about DFA.
Thank you for the diagram, this is such an elegant way to approach a problem.
Time sleep is very useful for any task that you want to run at an interval.
For example if you write control software for a camera. If you want 10 fps, you might time.sleep for 100ms.
Or you might have a web scraper that should refresh every 6 hours.
There are even safety reasons. Making your code slower helps deal with timing attacks:
https://www.techtarget.com/searchsecurity/definition/timing-attack
Can anyone explain how to arrive at these equations?
this code will catch an undesired error for lists that contain no integers
This comment is hidden because it contains spoiler information about the solution
You say f(3) -> [2, 1]
But shouldnt the output be [3]?
(Besides, 1 and 2 are consecutive numbers)
Some values have multiple solutions.
How should this be priorizited?
Nice implementation of the naive solution, though I don't think it is best practice to actually store all the factors in a list.
Wow beautiful solution!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...