using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp3 { class Program { public static int pocetInverzii(string a, string b) { int[,] dist = new int[a.Length + 1, b.Length + 1]; for (int i = 0; i < a.Length + 1; i++) dist[i, 0] = i; for (int i = 0; i < b.Length + 1; i++) dist[0, i] = i; for(int i = 1; i < a.Length+1; i++) { for (int j = 1; j < b.Length+1; j++) { int t1, t2,t3; t1 = dist[i - 1, j] + 1; t2 = dist[i, j - 1] + 1; t3 = dist[i - 1, j - 1]; if (a[i - 1] != b[j - 1]) { t3++; } dist[i, j] = Math.Min(Math.Min(t3, t1), t2); } } for(int i =0; i