For this Question: Given an index K, return the K-th row of <a href = "https://en.wikipedia.org/wiki/Pascal%27s_triangle">Pascal’s triangle</a>.
You must print the K-th row modulo 10<sup>9</sup> + 7.

<b>The rows of Pascal's triangle are conventionally enumerated starting with row K=0 at the top (the 0th row) </b>The only line of input contains the input K.

<b>Constraints:-</b>
0 &le; K &le; 3000
Print k-th row of Pascal's Triangle containing k+1 integers modulo 10^9+7.Sample Input :
3

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



class Main {
	public static void main (String[] args) {
        Scanner sc = new Scanner(System.in);
		int k = sc.nextInt();
		int digit = 1;
        int m = 1000000007;;
        int arr[] = new int[k+1];
        arr[0] = 1;
        arr[1] = 1;
        for(int i=2; i<=k; i++){
            for(int j=i;j>=1;j--){
                arr[j] += arr[j-1];
                arr[j] = arr[j]%m;
            }
        }
        for(int i=0;i<=k;i++){
            System.out.print(arr[i] + " ");
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?