Skip to content

Files

Latest commit

 

History

History

0x1A-hash_tables

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Oct 13, 2024
Nov 30, 2023

0x1A-hash_tables

Description

This project focuses on hash tables in C. It covers how to create and use hash tables, how to handle collisions, and how to implement basic operations such as insertion, deletion, and lookup.

Resources

Read or watch

Learning Objectives

General

  • What is a hash function.
  • What makes a good hash function.
  • What is a hash table, how do they work and how to use them.
  • What is a collision and what are the main ways of dealing with collisions in the context of a hash table.
  • What are the advantages and drawbacks of using hash tables.
  • What are the most common use cases of hash tables.

Tasks

Task Name File Description
Create a hash table 0-hash_table_create.c Writes a function that creates a hash table.
Implement the djb2 algorithm 1-djb2.c Writes a hash function implementing the djb2 algorithm.
Get the index of a key 2-key_index.c Writes a function that gives you the index of a key.
Add an element to the hash table 3-hash_table_set.c Writes a function that adds an element to the hash table.
Retrieve a value associated with a key 4-hash_table_get.c Writes a function that retrieves a value associated with a key.
Print a hash table 5-hash_table_print.c Writes a function that prints a hash table.
Delete a hash table 6-hash_table_delete.c Writes a function that deletes a hash table.
Create a sorted hash table 100-sorted_hash_table.c Writes functions that create and manage a sorted hash table.