笔记
czyaaa.
这个作者很懒,什么都没留下…
展开
-
散列表哈希(除留余数法)
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #define HASHSIZE 12 #define NULLKEY -(1<<31) int m; typedef struct { int *elem; //动态数组 int count; //记录哈希表元素个数 }HashTable; void Init(HashTable *H) { m = HAS原创 2021-07-26 20:30:05 · 818 阅读 · 1 评论 -
队列模拟
#ifndef QUEUE_H_INCLUDED #define QUEUE_H_INCLUDED #include <stdio.h> #include <stdbool.h> #define MAXSIZE 10 typedef struct { long arrive; int processtime; }Item; typedef struct node { Item item; struct node *next; }Node; t原创 2021-03-12 10:42:09 · 116 阅读 · 0 评论 -
单链表存储电影信息
单链表的封装 #ifndef LIST_H_INCLUDEDa //防止别的头文件里包含此文件从而多包含 #define LIST_H_INCLUDEDa #include <stdbool.h> #define TSIZE 45 #include <stdio.h> #include <stdbool.h> typedef struct flim { char title[TSIZE]; int rating; }Item; typedef st原创 2021-03-12 10:40:13 · 114 阅读 · 0 评论