All languages

C

You're viewing a free preview. Sign in free to read every script.

Why this exists C has no dictionary or map. The moment you need "count by key", "look up by name" or "have I seen this before?", you need one, and writing it yourself is the standard way to understand how Python's dict,…

A Hash Table in C: Counting Hosts with Chaining, Resizing and a Top-N Report

Build a string-keyed hash table from scratch (hash function, buckets, chaining, growing at a load factor), use it to count requests per client from a log, and print a sorted top-five report, leak-free.

Sign in free to read this script, along with the rest of the library.

Sign in free