Requirements for the Jigsaw Puzzle

Learn about all requirements of the jigsaw puzzle problem.

We'll cover the following

In this lesson, we’ll list down the requirements of our jigsaw puzzle problem. This is a very crucial step since requirements define the scope of a problem, so getting them right from the interviewer and understanding them well will make the design of the rest of the problem smooth and easy.

We’ll use the notational convention to identify each requirement with a unique label "Rn", where "R" is short for Requirement and "n" is a natural number.

Requirement collection

For the jigsaw puzzle problem, the requirements are defined below:

R1: Our board will be in the shape of a rectangle.

R2: All pieces will have four sides that can either have an indentation, an extrusion, or a flat edge.

R3: There are four corner pieces, some edge pieces, and the remaining ones are the middle pieces. A corner piece has two flat sides, an edge piece only has one flat side, and a middle piece doesn’t have any flat edge.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.