Language: C++

#include <stdio.h>
#include <list>

#define OPERATOR_LEN_MAX 16
#define STR_LEN_MAX 12
#define HASH2_MOD 9
#define HASH_BUCKET_SIZE 17

using namespace std;

char buckets[HASH_BUCKET_SIZE][STR_LEN_MAX];

void print_buckets() {
  for(int i=0; i<HASH_BUCKET_SIZE; i++) {
    printf("%d: %s\n", i, buckets[i]);
  }
}

void init_hash() {
  for(int i=0; i<HASH_BUCKET_SIZE; i++) {
    buckets[i][0] = '\0';
  }
}

int str_to_i(char str[]) {
  int v = 0;
  int len = strlen(str);
  for(size_t i=0; i<len; i++) {
    v += str[i];
  }
  return v;
}

int hash1(char str[]) {
  return str_to_i(str) % HASH_BUCKET_SIZE;
}

int hash2(char str[]) {
  return str_to_i(str) % HASH2_MOD;
}

void insert(char str[]) {
  int h1 = hash1(str);
  int h2 = hash2(str);

  int itr = 0;
  while(true) {
    int p = (h1 + (itr * h2))  % HASH_BUCKET_SIZE;

    if(strlen(buckets[p]) == 0) {
      strcpy(buckets[p], str);
      return;
    } else if(strcmp(buckets[p], str)) {
      return;
    }

    itr++;
  }
}

bool find(char str[]) {
  int h1 = hash1(str);
  int h2 = hash2(str);

  int itr = 0;
  while(true) {
    int p = (h1 + (itr * h2)) % HASH_BUCKET_SIZE;

    if(strlen(buckets[p]) == 0) {
      return false;
    } else if(strcmp(buckets[p], str) == 0) {
      return true;
    }

    itr++;
  }


  return false;
}

int main() {
  init_hash();

  int n;
  scanf("%d", &n);

  for(int i=0; i<n; i++) {
    char op[OPERATOR_LEN_MAX];
    char str[STR_LEN_MAX];
    scanf("%s", op);
    scanf("%s", str);

    if(op[0] == 'i') {
      insert(str);
    } else if(op[0] == 'f') {
      bool res = find(str);
      if(res)
        printf("yes\n");
      else
        printf("no\n");
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int str_to_i(char*)':
a.cc:27:13: error: 'strlen' was not declared in this scope
   27 |   int len = strlen(str);
      |             ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <list>
  +++ |+#include <cstring>
    3 | 
a.cc: In function 'void insert(char*)':
a.cc:50:8: error: 'strlen' was not declared in this scope
   50 |     if(strlen(buckets[p]) == 0) {
      |        ^~~~~~
a.cc:50:8: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:51:7: error: 'strcpy' was not declared in this scope
   51 |       strcpy(buckets[p], str);
      |       ^~~~~~
a.cc:51:7: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:53:15: error: 'strcmp' was not declared in this scope
   53 |     } else if(strcmp(buckets[p], str)) {
      |               ^~~~~~
a.cc:53:15: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'bool find(char*)':
a.cc:69:8: error: 'strlen' was not declared in this scope
   69 |     if(strlen(buckets[p]) == 0) {
      |        ^~~~~~
a.cc:69:8: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:71:15: error: 'strcmp' was not declared in this scope
   71 |     } else if(strcmp(buckets[p], str) == 0) {
      |               ^~~~~~
a.cc:71:15: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'