Skip to content

Instantly share code, notes, and snippets.

View rlupu's full-sized avatar

rlupu

View GitHub Profile
@rlupu
rlupu / list.c
Last active October 30, 2025 17:43
Simple chaining list implementation
/*
* Description : Simple chaining list
* Date : 14/1/2025
* Author : rlupu @ UPB
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@rlupu
rlupu / htab.c
Last active October 30, 2025 18:12
Hash table with collisions resolution mechanism based on list
/*
* Description : Hash table with collisions resolution mechanism based on list
* Date : 14/1/2025
* Author : rlupu @ UPB
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
@rlupu
rlupu / whash.c
Last active October 30, 2025 17:51
Weak hash functions (fast, no crypto properties)
#include <stdint.h>
#include <stdlib.h>
#include "whash.h"
/* modaddition
* A simple and terrible weak hash function
*/
inline unsigned int modaddition(unsigned char *in, unsigned int len){ /*hash size = 16b */
@rlupu
rlupu / phonebook.c
Last active October 30, 2025 19:14
SDA Lucrarea 1
/*
* Descriere : Agenda telefonica implementata ca lista simplu inlantuita
* Data : 29/10/2025
* Authors : dg, rlupu @ UNSTPB
* License: : GPLv3
*/
#include <stdio.h>
#include <stdlib.h>
#include <error.h>
@rlupu
rlupu / utils.c
Last active October 30, 2025 17:48
Miscellaneous and common functions
/*
* Description : implemented funcs are delay(), getch(), getche(), kbhit(), kbhit_wait(),
* GOTOXY(), CLRSCR(), rotr(), ...
* Part of the functions are terms/Linux only compatible. Only ASCII encoding support.
* All functions successfully tested.
* Date : 23/12/2024
* Author : rlupu, dg @ UPB
*/
#include <time.h>
#include <termios.h>