For this Question: Is it possible to sort a given string s with at most a single deletion operation allowed, i.e., removing any one character from the string?The first line contains string s.

<b>Constraints</b>
n = |s|
1 &le; n &le; 100Print "YES" without quotes, if it is possible to sort the string, otherwise print "NO".Sample Input 1:
abcac

Sample Output:
YES

Explanation: 
we can delete 'a' at index 4., I have written this Solution Code: import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.*;
public class Main {
    public static String sortStringWithSingleDeletion(String s) {
    int n = s.length();
    for (int i = 0; i < n; i++) {
        StringBuilder sb = new StringBuilder();
        sb.append(s.substring(0, i)).append(s.substring(i + 1));
        boolean vd=true;
        for(int j=1;j<n-1;j++){
            if(sb.charAt(j)<sb.charAt(j-1)){
                vd=false;
                break;
            }
        }
        if(vd){
            return "YES";
        }
    }
    return "NO";
}

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        int n=s.length();
        assert n>=1&&n<=100 : "Input not valid";
        System.out.print(sortStringWithSingleDeletion(s));
        
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?