@@ -0,0 +1,1043 @@
+package com.lc.string;%0A%0Apublic class OneEditDistance %7B%0A%0A    public static boolean isOneEditDistance(String s, String t) %7B%0A        if(s==null %7C%7C t==null)%0A            return false;%0A%0A        int m = s.length();%0A        int n = t.length();%0A%0A        if(Math.abs(m-n)%3E1)%7B%0A            return false;%0A        %7D%0A%0A        int i=0;%0A        int j=0;%0A        int count=0;%0A%0A        while(i%3Cm&&j%3Cn)%7B%0A            if(s.charAt(i)==t.charAt(j))%7B%0A                i++;%0A                j++;%0A            %7Delse%7B%0A                count++;%0A                if(count%3E1)%0A                    return false;%0A%0A                if(m%3En)%7B%0A                    i++;%0A                %7Delse if(m%3Cn)%7B%0A                    j++;%0A                %7Delse%7B%0A                    i++;%0A                    j++;%0A                %7D%0A            %7D%0A        %7D%0A%0A        if(i%3Cm%7C%7Cj%3Cn)%7B%0A            count++;%0A        %7D%0A%0A        if(count==1)%0A            return true;%0A%0A        return false;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(isOneEditDistance(%22bcded%22,%22cded%22));%0A    %7D%0A%7D%0A

Create OneEditDistance.java