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
Missing edge cases for horizontal and vertical line segments colinear with one of the rectangular sides with different intersection patterns:
Also missing edge cases where line has zero width:
And edge cases with 0 rectangle area (technically 0 width only and 0 height only should be tested too, but I didn't bother to write tests for those):
The author solution can correctly handle all these test cases without failing or throwing exceptions (due to division by 0). Every submission besides one fails against some of them.