Driver code
public static void Main ( String [ ] args ) { String [ ] arr = { " ale " , " apple " , " monkey " , " plea " } ; List < String > dict = new List < String > ( arr ) ; String str = " abpcplea " ; Console . WriteLine ( findLongestString ( dict , str ) ) ; } }