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.
This comment is hidden because it contains spoiler information about the solution
OP solved it, closing
Which tests? Please state the input values. Which language?
3 of textcases are giving incorrect results
Closing.
Closing.
If you ask this question, you did not understand the kata. Read the description carefully, you'll find the answer, it's very clear.
This comment is hidden because it contains spoiler information about the solution
The
return
line of this function will call the function itself as needed until a condition is met. This is known as recursion. Here's an alternate source.how can you use your function iside the function in the last line
The error message reveals that your code is trying to access an element at an index not within range of the indices for this object. This most likely occurs at
arr[i+1]
.I passed 3 tests but I get this error
Traceback (most recent call last):
File "tests.py", line 42, in
test.assert_equals(dirReduc(a), [])
File "/workspace/default/solution.py", line 3, in dirReduc
if arr[i]=="SOUTH" and arr[i+1]=="NORTH":
IndexError: list index out of range
I figured it out myself
my code is similar to this
This comment is hidden because it contains spoiler information about the solution
Loading more items...