You are developing a 'Love calculator'. So, given two names your software will generate the percentage of their 'love' according to their names. The software requires the following things: 1.The length of the shortest string that contains the names as subsequence. 2.Total number of unique shortest strings which contain the names as subsequence. Now your task is to find these parts.
I find 1st part by computing (length of 1st name +length of 2nd name — LCS(1st name , 2nd name ).
But how to find 2nd part ??