Skip to content

A C module full of ADT implementations. From BSTs, to Inventories, to sequences.

Notifications You must be signed in to change notification settings

jacobsteves/ADTs-Galore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro to ADTs Galore

These ADTs all allocate memory. Each interface contains the function needed to free the memory allocate. You must free anything you initially allocate space to.

Before Getting Started

Read each interface file (each .h file) to see the functions and function definitions available. This will show you what each function is supposed to do, and the precautions you may need to take to free allocated memory.

Abstract Data Type Modules

PriorityQueue

An ADT module like a regular queue, except each additional element has a given priority. Elements with a higher priority are served before elements with lower priority.

Inventory

A inventory ADT is exactly what it sounds like. It stores items in an object. You can look up the quantity of an item, add an item, remove an item, add quantity, etc.

StrDeque

A StrDeque is a double-ended string queue ADT module. Items can be either added or removed from the back, or added or removed from the front.

BST

A bst is a binary search tree. Each node in the bst is larger than its left child, yet smaller than its right child. When removing nodes, it is very important to not remove its children.

Sequence

A sequence is an ADT where items can be added, removed, or viewed at any point.

ArrSequence

This implementation uses an array rather than a linked list.

LLSequence

This implementation uses a linked list rather than an array.

Misc

SetUp

To start, copy this repo to any IDE running C. From there, use the information in the interface to set up your desired ADT.

Tests

Simply run the function in the appropriate testing file to test it. This will test all endpoints.

About

A C module full of ADT implementations. From BSTs, to Inventories, to sequences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages