<commit_before>#pragma once

#include <vector>
#include <unordered_map>

using std::vector;
using std::unordered_map;

class Solution {
public:
  vector<int> twoSum(vector<int>& nums, int target) {

  }
};<commit_msg>twosum solution<commit_after>#pragma once

#include <vector>
#include <unordered_map>

using std::vector;
using std::unordered_map;

class Solution {
public:
  vector<int> twoSum(const vector<int>& nums, const int target) {
    unordered_map<int, int> values;

    int delta;
    for (int idx = 0; idx < nums.size(); ++idx) {
      delta = target - nums[idx];

      // If condition is true, then we're done here
      if (values.find(delta) != values.cend()) {
        return vector<int>{values[delta], idx + 1};
      }

      values[nums[idx]] = idx + 1;
    }

    // Should not happen but it's here to satisfy the compiler
    return vector<int>{};
  }
};
{'fraction_non_alphanumeric': 0.1402508551881414, 'fraction_numerical': 0.0034207525655644243, 'mean_word_length': 3.5257731958762886, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 14, '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': '6632700', 'n_tokens_mistral': 304, 'n_tokens_neox': 293, 'n_words': 84}