5 kyu
Count Rectangles
26ecolban
Loading description...
Puzzles
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This kata makes 0% sense to me
From sample tests: How can there be points in the results that are not given in the input?
From description: how are these even rectangles?
The 12 rectangles should have been:
I'll update.
The vertices are given in adjancency order, starting at any vertice and moving in either direction (i.e., clockwise or counter-clockwise). E.g.,
Using the dot-product, you can verify that the sides are perpendicular.
ok looks good now
Could you list these rectangles? There're definitely 4 with their sides parallel to X/Y axes but I have no idea where the last one is.
(5,0), (3,3), (7,1), (5,4)
I agree, it's hard to identify the rectangles. The 5 rectangles are:
Have added this info to the Examples Tests.
out of curiosity, could you tell what is the required time complexity?
This comment has been hidden.
'kay, thx. Maybe I'll come up with some ideas...
cheers
This comment has been hidden.
perf constraints are not prohibiting slower solutions to pass, such as mine
This comment has been hidden.
Fixed!