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.
try this to measure time :
I did it on the solution that I implemented (based on a sort) and found it OK in performance compared to other solutions.
For ex on a 1-million items list: time to execute with sort = 3 ms, time to execute with solution with sets = 8 ms
for whatever that's worth ...
Way late here, but for anyone else reading this: An <odd> % 2 == 1, and an <even> % 2 == 0, both of which can be interpreted as the boolean True (1) and False (0) in Python, respectively. So line 3 is essentially saying odd = True, even = False.
I also chose sorting, but I'd like to run some time comparisons on these different methods.
I'm pretty sure that memory swaps cost more time than comparisons.
This comment is hidden because it contains spoiler information about the solution
Can anyone show me how this code works?
idk what [\[\], ] stands for
remove the words in all string which are not in s1+s2
brilliant...
impressive
quite confused. Is it regular expression?
what does reduce(1,(a,b)) mean?
cool.
Brilliant solution
I use String instead of int to count the number of d and that makes the program much more complicated
why? is it because it doesn't reflect any meanings?
This comment is hidden because it contains spoiler information about the solution
Loading more items...