Problems with Levenshtein algorithm in Java

后端 未结 5 660
情深已故
情深已故 2021-02-08 20:16

I want to use the Levenshtein algorithm for the following task: if a user on my website searches for some value (he enters characters in a input), I want to instantly check for

5条回答
  •  借酒劲吻你
    2021-02-08 21:07

    public class Algorithmm {
        public static void main(String args[])
        {
            Scanner sc= new Scanner(System.in);
            System.out.println("Enter the correct string ");
            String correct=sc.nextLine();
            System.out.println("Enter the incorrect string ");
            String incorrect=sc.nextLine();
            int i=correct.length(),j=incorrect.length();
            ++i ; ++j;
            int a[][] = new int[i][j];
            int b[] = new int[3];       
            for(int m=0;m

提交回复
热议问题