<commit_before><commit_msg>496. Next Greater Element I<commit_after>class Solution {
public:
    vector<int> nextGreaterElement(vector<int>& findNums, vector<int>& nums) {
        vector<int> result;
        
        for (int i = 0; i < findNums.size(); ++i) {
            bool find = false;
            int locate = locate_at(nums, findNums[i]);
            if (-1 == locate) {
                result.push_back(-1);
                continue;
            }
            for (int j = locate + 1; j < nums.size(); ++j) {
                if (nums[j] > findNums[i]) {
                    result.push_back(nums[j]);
                    find = true;
                    break;
                }
            }
            if (!find)
                result.push_back(-1);
        }
        return result;
    }
private:
    int locate_at(const vector<int>& nums, int findNum) {
        for (int i = 0; i < nums.size(); ++i) {
            if (nums[i] == findNum)
                return i;
        }
        return -1;
    }
};
{'fraction_non_alphanumeric': 0.13188976377952755, 'fraction_numerical': 0.00984251968503937, 'mean_word_length': 1.2751677852348993, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '3850180', 'n_tokens_mistral': 321, 'n_tokens_neox': 305, 'n_words': 74}