<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static int lengthOfLongestSubstring(char *s)
{
    int offset[128];
    int max_len = 0;
    int len = 0;
    int index = 0;

    memset(offset, 0xff, sizeof(offset));
    while (*s != '\0') {
        if (offset[*s] == -1) {
            len++;
        } else {
            if (index - offset[*s] > len) {
                /* not included in sliding window, go on increasing */
                len++;
            } else {<commit_msg>Add C++ implementation<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <string.h>


int lengthOfLongestSubstring(char *s)
{
    int offset[128];
    int max_len = 0;
    int len = 0;
    int index = 0;

    memset(offset, 0xff, sizeof(offset));
    while (*s != '\0') {
        if (offset[*s] == -1) {
            len++;
        } else {
            if (index - offset[*s] > len) {
                /* not included in sliding window, go on increasing */
                len++;
            } else {
{'fraction_non_alphanumeric': 0.15172413793103448, 'fraction_numerical': 0.017733990147783252, 'mean_word_length': 1.7988980716253444, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '983709', 'n_tokens_mistral': 350, 'n_tokens_neox': 322, 'n_words': 93}