text: C # Program to Count the number of ways to construct the target String
code: using System ; using System . Collections . Generic ; class GFG { static int mod = 1000000007 ; static int [ , ] dp = new int [ 1000 , 1000 ] ; static int calculate ( int pos , int prev , String s , List < int > index ) {