For this Question: Given string S representing a non- negative integer number, and an integer K, return the smallest possible integer after removing k digits from S.

Example:

Input: num = "1432219", k = 3
Output: "1219"
Explanation: Remove the three digits 4, 3, and 2 to form the new number 1219 which is the smallest.First contains the string S. Second line contains the integer K.

Constraints:
1 <= K <= S.size() <= 10^5
S contains only digits.
S does not start with 0.Print the required answer.Sample Input:
1432219
3

Sample Output:
1219

Sample Input:
2020
2

Sample Output:
0, I have written this Solution Code: import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
       
        String s = in.next();
        int k =Integer.parseInt(in.next());

        Stack<Integer> st = new Stack<Integer>();
        for(int i=0;i<s.length();i++){
            int d=s.charAt(i)-'0';
            while(k>0 && !st.empty() && st.peek() > d ){
                st.pop();
                k--;
            }
            st.push(d);
        }
        while(k>0){
            st.pop();
            k--;
        }
        int n=st.size();
        char arr[] = new char[n]; 
        for(int i=n-1;i>=0;i--){
            arr[i]=(char)(48+st.peek());
            st.pop();
        }

        String ans=String.valueOf(arr);
        int i=0;
        while(i<n && ans.charAt(i)=='0')i++;
        if(i==n){
            out.print("0");
        }
        else{
            out.print(ans.substring(i));
        }
        out.close();
    }

    
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void println(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?