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.
Haskell translation
Description is incorrect. Should read: "A person can complete a yoga pose if the sum of all levels in their row plus their own skill level is greater than or equal to the value of the pose."
Go Translation kumited
To make this kata a bit more interesting, it could potentially include other top level domains, like .org and .net. Using only "com" makes the kata a bit too easy in my opinion.
Another way to add some challenge could also be to include an invalid number of "."'s, so that the string passed is consider invalid if it includes any number of them besides 2.
The spec doesn't tell what happens to valid web addresses with multiple
www.
/.com
likewww.computer.com
orwww.searchmywww.com
. Or websites with more than 3 parts, likewww.yahoo.com.uk
orwww.penpineapple.applepen.com
.If you're only testing inputs of a highly specific form
www.([a-z]+).com
(yes, there are no numbers either, for some reasons) and not a general web address, it needs to be stated in the descriptions, or else a sane programmer will assume you want to solve this task in the most general case, which is impossible to do.Why? If you're testing invalid inputs (which isn't a particular good thing in the first place), why only empty string? Why not
None
, or general inputs?Hi,
You'll need to handle potential listIndex errors for edge positions
) ->[[0,0], [0], [0,0]]
for example[[0]]
, and you're missing a test with the position completely outside the grid.Note: using
0
for allowed and1
for forbidden is a bit counter intuitive, but well, why not.About your question below ("how to find the edge cases"), it's basically about answering to the question: "considering the task, in what case something could go wrong? (if something isn't implemented correctly)". Another approach is to considere the "space" of the possible inputs, make a grid of the different cases and check all the possibilities (that's the principe. In practice, this goes very wuickly out of hands as soon as the complexity of the input space grows). Considering your problem here, a possible approach (surely not complete):
About the array:
Abou the position:
With just that, you get already
3*3
kind of cases to tests with different values. Lots of work already... x)(x,y)
or(y,x)
?Lack of cases like
Needs Random Tests