Longest Uncommon Subsequence | C # program to find longest uncommon subsequence using naive method . ; function to calculate length of longest uncommon subsequence ; Case 1 : If strings are equal ; for case 2 and case 3 ; Driver code ; input strings
using System ; class GfG { static int findLUSlength ( String a , String b ) { if ( a . Equals ( b ) == true ) return 0 ; return Math . Max ( a . Length , b . Length ) ; } public static void Main ( ) { String a = " abcdabcd " , b = " abcabc " ; Console . Write ( findLUSlength ( a , b ) ) ; } }