Problem Statement | |||||||||||||
| A subsequence of a string is obtained by removing zero or more characters from it. You are given three Strings, and must determine the number of different non-empty subsequences they all share. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
| - | A subsequence should be counted only once even if it can be obtained in more than 1 way from any of the input Strings. | ||||||||||||
Constraints | |||||||||||||
| - | a, b and c will have between 1 and 50 characters each, inclusive. | ||||||||||||
| - | Every character of a, b and c will be a lowercase letter ('a'-'z'). | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||