c# - Find out how much percent one string contains in another -


I have to figure out how many percentages or characters are included in a string. I have tried the distance of Levenschatin, but this algorithm returns to how many letters should be changed to be equal to the wire. Can anyone help one? I need this in C #, but this is not so important.

Answer Code: public double long interaction (string S1, string S2) {// If the string is empty, the length should be 0. IsNullOrEmpty (s1) || String. ISILROQlight (S2)) 0;

  int [,] number = new intent [s1.Length, s2.Length]; // 2D array letter four; Four letter 2; // for the actual algorithm (int i = 0; i  

It seems that you want to do that The base is the base Algorithm Unfortunately, this problem is NP-hard, which means that there is no efficient (polynomial time) solution. There are some suggestions in the Wikipedia page.


Comments