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.
Missing fixed and example tests:
s = t = "ABCDEF
and t being a permutation of ss,t = "ABSDGFDHKDFHA", "AA"
s,t = "AABSDGFDHKDFH", "AA"
s,t = "BSDGFDHKDFHAA", "AA"
The random tests should also generate more versatile inputs.
t
inputs are currently very long, meaning the tests will in the end almost always generate the same kind of situations (confirmed when I was playing in forks: I very often got all the fixed tests wrong, and all the random tests passing, or just 1 wrong). So, the generation should pick different strategies randomly:t
(length < to 5 or 10)s
s
, at the beginning or the endcheers
This comment is hidden because it contains spoiler information about the solution
Hi,
XYYT
being considered or not a possible substring forXYT
. Edit: as a matter of fact, it seems to be valid => missing sample and fixed test, also.Cheers
Exactly, they don't own that problem. And the description here is different.
Definitely not ( IANAL and this is not legal advice ). But copyright applies to literal description text, examples, or test code; not the task in itself. The description is different, and though I can't read Leetcode's tests, they are probably different as well.
IDK, this kata isn't as simple as the other one, but to me it still looks like a basic raw algorithm rather than something combining enough unique ideas for the idea of the task to be copirightable (as opposed to the exact text).
I don't see anything that looks copied, the same maximum length of
2*10^4
isn't much.Potential copyright infringement: https://leetcode.com/problems/subarray-sum-equals-k/.
Potential copyright infringement: https://leetcode.com/problems/minimum-window-substring/.
Its items don't contradict this definition, so yes, it's vacuous truth.
Can an empty array have consecutive elements from the original array? But, from the first example, there is a subarray with a single element, can that be called consecutive?
I don't see anything about excluding empty subarrays in the description.
https://www.codewars.com/kata/5d1d1e6606f92a000e479b25
Duplicate? But I haven't checked performance requirements; and it looks like that one has had unfixed issues for a long time, so IDK...
I hadn't looked at the constraints that hard. Yes, of course you should start counting at
0
instead of1
. Empty strings are perfectly valid, and perfectly good edge cases.Apart from those artificial constraints, nothing says you can't have empty strings for either input, and for
t = ""
,""
is a correct output. So it should not be used to encode an invalid output.Considering the input constraints
1 <= length
, I don't think anyone would encounter emptys
ort
. Or do you mean I should put some empty strings as input?Loading more items...