text: Check whether jigsaw puzzle solveable or not | C ++ program for the above approach ; Function to check if the jigsaw Puzzle is solveable or not ; Base Case ; By placing the blank tabs as a chain ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; void checkSolveable ( int n , int m ) { if ( n == 1 or m == 1 ) cout << " YES " ; else if ( m == 2 and n == 2 ) cout << " YES " ; else cout << " NO " ; } int main ( ) { int n = 1 , m = 3 ; checkSolveable ( n , m ) ; }