Error is at line#33 in the code. See here:
>>if (line1[i-1] == line2[j-1])
Index for both the strings starts at 0 and ends at len-1, and so it should be [i-1] and [j-1]. U hvn't checked the first characters of both the strings.
Search found 2 matches
Search found 2 matches • Page 1 of 1
Hi -zx-, There is a logical error at line #18 in the code. Its here : >> else if ( emo[i-1][j].size() < emo [j-1].size() ) The code counts the total number of characters in emo[i-1][j] and emo [j-1], where it should actually be counting the number of words(and not no. of characters) in these 2 cells...