All Projects → bkthomps → Containers

bkthomps / Containers

Licence: mit
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Containers

Buckets Js
A complete, fully tested and documented data structure library written in pure JavaScript.
Stars: ✭ 1,128 (+802.4%)
Mutual labels:  data-structures, tree, stack, collections, tree-structure, set, priority-queue, collection, queue, map
Mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
Stars: ✭ 321 (+156.8%)
Mutual labels:  tree, stack, array, collections, set, priority-queue, list, queue
Staticvec
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.
Stars: ✭ 236 (+88.8%)
Mutual labels:  data-structures, vector, stack, array, datastructures, collections, containers, container
Cdcontainers
Library of data containers and data structures for C programming language.
Stars: ✭ 57 (-54.4%)
Mutual labels:  stack, datastructures, collections, avl-tree, queue, map, containers
Javascript Datastructures Algorithms
📚 collection of JavaScript and TypeScript data structures and algorithms for education purposes. Source code bundle of JavaScript algorithms and data structures book
Stars: ✭ 3,221 (+2476.8%)
Mutual labels:  data-structures, tree, stack, set, priority-queue, avl-tree, queue
Libgenerics
libgenerics is a minimalistic and generic library for C basic data structures.
Stars: ✭ 42 (-66.4%)
Mutual labels:  data-structures, vector, stack, priority-queue, queue, map
Gods
GoDS (Go Data Structures). Containers (Sets, Lists, Stacks, Maps, Trees), Sets (HashSet, TreeSet, LinkedHashSet), Lists (ArrayList, SinglyLinkedList, DoublyLinkedList), Stacks (LinkedListStack, ArrayStack), Maps (HashMap, TreeMap, HashBidiMap, TreeBidiMap, LinkedHashMap), Trees (RedBlackTree, AVLTree, BTree, BinaryHeap), Comparators, Iterators, …
Stars: ✭ 10,883 (+8606.4%)
Mutual labels:  tree, stack, set, avl-tree, list, map
C Macro Collections
Easy to use, header only, macro generated, generic and type-safe Data Structures in C
Stars: ✭ 192 (+53.6%)
Mutual labels:  data-structures, stack, datastructures, list, queue, containers
Collection
A PHP library for representing and manipulating collections.
Stars: ✭ 488 (+290.4%)
Mutual labels:  array, set, collection, queue, map
Geeksforgeeks Dsa 2
This repository contains all the assignments and practice questions solved during the Data Structures and Algorithms course in C++ taught by the Geeks For Geeks team.
Stars: ✭ 53 (-57.6%)
Mutual labels:  data-structures, tree, stack, array, queue
Sc
Common libraries and data structures for C.
Stars: ✭ 161 (+28.8%)
Mutual labels:  data-structures, vector, stack, collections, queue
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (+49.6%)
Mutual labels:  data-structures, tree, stack, datastructures, queue
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+3452.8%)
Mutual labels:  data-structures, tree, stack, array, queue
Datastructure
常用数据结构及其算法的Java实现,包括但不仅限于链表、栈,队列,树,堆,图等经典数据结构及其他经典基础算法(如排序等)...
Stars: ✭ 419 (+235.2%)
Mutual labels:  tree, stack, datastructures, list, queue
NonEmptyCollections
A type-safe implementation for collections that cannot be empty. Life is too short for emptiness-checks!
Stars: ✭ 45 (-64%)
Mutual labels:  map, set, list, collection, collections
Data-structures
Data Structures in Java
Stars: ✭ 13 (-89.6%)
Mutual labels:  stack, queue, datastructures, data-structures, tree-structure
Data Structures
Common data structures and algorithms implemented in JavaScript
Stars: ✭ 139 (+11.2%)
Mutual labels:  data-structures, tree, stack, array, queue
Redux Data Structures
Reducer factory functions for common data structures: counters, maps, lists (queues, stacks), sets, etc.
Stars: ✭ 157 (+25.6%)
Mutual labels:  data-structures, stack, set, queue, map
ctl
My variant of the C Template Library
Stars: ✭ 105 (-16%)
Mutual labels:  set, tree, stack, queue, priority-queue
Gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL
Stars: ✭ 254 (+103.2%)
Mutual labels:  vector, stack, set, list, queue

GitHubBuild Documentation Codecov Language License

Containers

This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.

Inspired by the C++ standard library; however, implemented using C with different function interfaces as the C++ standard library but with the same container names.

Setup

It is possible to compile this library as either static .a or dynamic .so:

  1. A static library is slightly faster than a dynamic one, however, if the library is modified, the entire project codebase which uses it will need to be relinked.
  2. A dynamic library can be changed without relinking the codebase, assuming no function definitions have changed.

The installation process is as follows:

  1. Clone this repository and navigate to it.
  2. Run make static_clang/make static_gcc or make dynamic_clang/make dynamic_gcc for either a static or dynamic library.
  3. Then, you can copy-paste containers.h and containers.a/containers.so into your project to include the containers.
  4. Finally, you remember to link the library by including containers.a -ldl/containers.so -ldl as an argument.

Documentation

For high-level documentation and usage, visit the documentation page. For in-depth documentation, visit the code docs page.

Container Types

The container types that this library contains are described below.

Sequence containers

Data structures which can be accessed sequentially.

  • array - static contiguous array
  • vector - dynamic contiguous array
  • deque - double-ended queue
  • forward_list - singly-linked list
  • list - doubly-linked list

Associative containers

Data structures that can be quickly searched which use comparators.

  • set - collection of unique keys, sorted by keys
  • map - collection of key-value pairs, sorted by keys, keys are unique
  • multiset - collection of keys, sorted by keys
  • multimap - collection of key-value pairs, sorted by keys

Unordered associative containers

Data structures that can be quickly searched which use hashing.

  • unordered_set - collection of unique keys, hashed by keys
  • unordered_map - collection of key-value pairs, hashed by keys, keys are unique
  • unordered_multiset - collection of keys, hashed by keys
  • unordered_multimap - collection of key-value pairs, hashed by keys

Container adaptors

Data structures which adapt other containers to enhance functionality.

  • stack - adapts a container to provide stack (last-in first-out)
  • queue - adapts a container to provide queue (first-in first-out)
  • priority_queue - adapts a container to provide priority queue
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].