<commit_before>/**
 * Created by fredf on 3/7/2017.
 */
public class PascalTriangle {
    private static void print(int n) {
        for (int i = 0; i < n; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(pascal(i, j) + " ");
            }
            System.out.println();
        }
    }

    private static int pascal(int i, int j) {
        if (j == 0) {
            return 1;
        } else if (j == i) {
            return 1;
        } else {
            return pascal(i - 1, j - 1) + pascal(i - 1, j);
        }

    }

    public static void main(String[] args) {
        PascalTriangle.print(6);
    }
}
<commit_msg>Fixed Pascal Triangle to start from row 0 instead of row 1.<commit_after>/**
 * Created by fredf on 3/7/2017.
 */
public class PascalTriangle {
    private static void print(int n) {
        for (int i = 0; i <= n; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(pascal(i, j) + " ");
            }
            System.out.println();
        }
    }

    private static int pascal(int i, int j) {
        if (j == 0) {
            return 1;
        } else if (j == i) {
            return 1;
        } else {
            return pascal(i - 1, j - 1) + pascal(i - 1, j);
        }

    }

    public static void main(String[] args) {
        PascalTriangle.print(6);
    }
}

{'fraction_non_alphanumeric': 0.13793103448275862, 'fraction_numerical': 0.022519352568613652, 'mean_word_length': 1.2393700787401576, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1754867', 'n_tokens_mistral': 496, 'n_tokens_neox': 458, 'n_words': 139}