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.
first try - did well , yet still learning how this env works.
This was the first thing I tried, but I kept getting errors. It worked fine in VSCode on my computer, but would not work on here.
Assume, you have additional ' ' (space) at the end of result string.
When you output with console.log, the spaces are trimmed in being displayed. If you do code.split(' ').join(' ') and output that, you'll see it as your code sees it.
None of the Javascript test cases use integer division (/) or modulo (%) operations.
I have infinity loop for python version on "Sieve of Eratosthenes" test-case.
There is a python input vector :
2>:3g" "-!v\ g30 <
|!`"&":+1_:.:03p>03g+:"&"`|
@ ^ p3" ":<
2 2345678901234567890123456789012345678
It seems, that leading spaces are missing on 2nd and 3rd lines... And probably some spaces on 3rd line
I tested "test" on http://www.bedroomlan.org/tools/befunge-playground#prog=hello,mode=run and there is an infinity loop too.
Seems, this kata is already exist...
http://www.codewars.com/kata/flatten-1
We wrote sorted_insert, length and other functions in previous tasks. Seems, they should be available for usage :)
Yes, you are rigth.
all()
function usage is more readable and beautifull.I will try to use it in such cases.
Thank you!
Ok, let me give you some suggestion about the style:
set(string) is unnecessary: a string is already iterable on his characters, so you can write:
approved = "abcdefghijklmnopqrstuvwxyz0123456789"
continue is unnecessary: you can rephrase the for loop as:
or better, use the all function:
In this kata the best option is simply
isalnum()
... but you can train your style to be more pythonic i think ^_^Good work :)