MATCHSTR EDITORIAL

PROBLEM LINK

PRE-REQUISITES:
BACKTRACKING, RECURSION

EXPLANATION:
Given a list of ‘N’ strings and another string ‘S’ we need to find the total possible permutations of ‘N’ strings such that those permutations result in the string ‘S’, the simple solution is to use backtracking and find all possible permutations of strings if any permutation results in the string ‘S’ increase answer by 1.

SOLUTION LINK

1 Like