Made this for fun and procrastination. It's not perfect and I'm pretty sure it has room for improvement.
Basic goal is to read a dictionary from a file and translate some text piped through stdin. Only C standard library functions should be used (althoug it was allowed to use getline() or strdup()). Some examples are provided here, the fail test are provided by belorenz as well as some code. More information can be found in here, but only in german.
$ gcc -o loesung -O3 -std=c11 -Wall -Werror -DNDEBUG loesung.c
$ cat example.stdin | ./loesung example.wb
- https://github.com/jamesroutley/write-a-hash-table
- https://stackoverflow.com/questions/7666509/hash-function-for-string?rq=1
- https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed
- http://www.cse.yorku.ca/~oz/hash.html
- https://groups.google.com/forum/#!msg/comp.lang.c/lSKWXiuNOAk/zstZ3SRhCjgJ
- https://stackoverflow.com/questions/50399090/use-of-a-signed-integer-operand-with-a-binary-bitwise-operator-when-using-un