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.
def
is not the only way to define a function in Python.how do i dont use 'def' and 'return' when codwars want to call my code with def?
The
ISSUE
tag is reserved for critical flaws with the tests. 718 people have solved this Kata in JS before just fine, so, when in doubt, please use theQUESTION
tag instead. As for your question, the code inside your loop needs correction. Instead of focusing on the complicated test that fails, focus on the other more simple test that the solution fails on:f: abcd s: dabcd
returnsabcd
for you when it should returnabcdabcd
. This is a byproduct of the method you use to calculateindexInSecond
.Yes, the issue resutls from your code misunderstanding the task. The only overlap that this Kata is interested in is between the end of the first string and the start of the other. A string overlapping in the middle of the other doesn't count. As you've noticed,
merge_strings('xabc', 'ab')
is expected to returnxabcab
(since no overlap on the edges), and notxabc
. Consult the Kata description further if in doubtThis comment is hidden because it contains spoiler information about the solution
That's what it means they overlap and become a single interval from 1 to 5.
Anyway, why does it says "Since
[1, 4]
and[3, 5]
is overlap"?Hi, I'm a bit confused about the example on overlapping interval. I thought the sum would be 8 but it said 7 instead. Am I missing something?
Thanks it worked
Please see this paragraph: https://docs.codewars.com/training/training-example#debugging-a-kata for some hints how to debug your solution.
No
How can i see it
Please see this paragraph: https://docs.codewars.com/training/training-example#debugging-a-kata for some hints how to debug your solution.
Do you know what inputs make you fail?
This comment is hidden because it contains spoiler information about the solution