So in a recent algorithm contest I was given a task to create an algorithm that could construct a rectangle out of n triangles.
The information that is available to me is:
- Width and height of the rectangle
- Coordinates of all three corner points of each triangle
- All triangles have to be used that are given
- Triangles cannot be rotated
- Triangles cannot overlap
- It is always possible to construct a rectangle from the given triangles
I've spent some time googling for algorithms that could help me get started but I found nothing. So my question is, how do I go about solving such problem?