HI I M ASHISH I WANT ALGORYTHMUS OF THIS PROBLEM
Jigsaw puzzles. You would have solved many in your childhood and many people still
like it in their old ages also. Now what you have got to do is to solve jigsaw puzzles
using the computer. The jigsaw puzzle here is a square of dimension d (a puzzle with
d^2 pieces) and the jigsaw pieces (all same dimensions) are of dimensions H x W
(Which means the pieces have ‘H’ rows of ‘W’ characters.
The pieces will be given as ( For eg a piece of 2 x 3 )
ABC
DEF
5 0 0 -2
Where the pieces is having 2 rows of 3 characters (ABC DEF ) and the corners have
directions 5 0 0 -2.
These numbers (between –cons and +cons) will indicate the shape of the top, left,
bottom and right edges of the puzzle piece, respectively. A value of 0 indicates a
straight edge. Positive and Negative edges of same values are an interlock. The pieces
can NOT be rotated and all pieces will be unique.
Note : All characters can be a part of the puzzle piece.
Your Job
The puzzle will have one and only one solution and you have to find it. If the puzzle
is not possible then return an error.