<commit_before><commit_msg>Create Triangle.cpp<commit_after>class Solution {
public:
    int minimumTotal(vector<vector<int> > &triangle) {
        if (triangle.size() == 0) return 0;
        int m = triangle.size();
        vector<int> dp(m);
        for (int i = 0; i < m; i++) {
            vector<int> tmp(i + 1);
            for (int j = 0; j <= i; j++) {
                if (i == 0) {
                    tmp[0] = triangle[0][0];
                } else if (j == 0) {
                    tmp[0] = dp[0] + triangle[i][0];
                } else if (j == i) {
                    tmp[j] = dp[j - 1] + triangle[i][i];
                } else {
                    tmp[j] = min(dp[j - 1], dp[j]) + triangle[i][j];
                }
            }
            for (int j = 0; j <= i; j++) {
                dp[j] = tmp[j];
            }
        }
        int result = dp[0];
        for (int i = 0; i < dp.size(); i++) {
            result = min(result, dp[i]);
        }
        return result;
    }
};
{'fraction_non_alphanumeric': 0.17482517482517482, 'fraction_numerical': 0.017982017982017984, 'mean_word_length': 1.1548387096774193, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '7095293', 'n_tokens_mistral': 347, 'n_tokens_neox': 323, 'n_words': 84}