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.
My assumtion to this task:
- input a list w/ numbers as text
- sorting the text_numbers as shown
My solution passed the TEST ... and is failing to ATTEMPT
By looking to the hidden test_cases I'm becoming confused:
INPUT_ = ['pxw', 'vhjgt', 'vhjgt', 'pxw', 'pxw', 'pxw', 'pxw']
OUTPUT = ['pxw', 'vhjgt', 'pxw', 'vhjgt', 'pxw', 'pxw', 'pxw'] # expected
INPUT_ = ['ytw', 'jnv', 'utfh', 'jnv', 'utfh', 'jnv', 'jnv', 'ytw', 'jnv', 'utfh', 'utfh', 'utfh', 'ytw']
OUTPUT = ['ytw', 'jnv', 'utfh', 'ytw', 'jnv', 'utfh', 'ytw', 'jnv', 'utfh', 'jnv', 'utfh', 'jnv', 'utfh'] # expected
Are the random test_cases wrong?
Was I misled by the given examples?
Was I rated with unknown expectations?
.... or do I miss anything ???
Doing the ATTEMPT -> I run in the issue:
-> ValueError: invalid literal for int() with base 10: 'htgnj '
for sure: 'htgnj ' can not be returned as Integer
def distribute_evenly(lst):
print(lst)
return ['one']
Just avoid list and repeated calc of the squares. Both is taking a lot of time. My results in sec:
n = 1.000: 0.0002543900000091 sec
n = 10.000: 0.0019760499999847 sec
n = 100.000: 0.0156731199999967 sec
n = 1.000.000: 0.1389633400000093 sec
n = 10.000.000: 1.4097446399999853 sec