GithubHelp home page GithubHelp logo

almayor / data_structures Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 28.24 MB

Polymorphic data structures and associated algorithms in C. Probably don't use.

C 76.62% C++ 15.87% Makefile 7.51%
42school 21school data-structures c polymorphism

data_structures's Introduction

data_structures

Disclaimer

In School 42, almost every project must be written to comply with. coding standard (also known as the "Norm"). As a result, the implementation of certain parts may appear strange.

Overview

  • Code documentation
  • This is a library of assorted polymorphic data structures and their associated algorithms, implemented in C.
  • Each data structure can work with an extensible range of data types. Such polymorphism is achieved with the use of void pointers at the expense of limited loss of type safety.
  • Each data structure is initialized with an immutable t_type structure, containing pointers to functions required to work with a datatype (e.g. copy, delete, compare, hash etc).
  • The data structures implemented so far
    • dynamic array
    • doubly-linked list
    • minimum priority queue
    • maximum priority queue
    • queue
    • stack
    • hashmap
    • hashset
    • binary search tree
    • red-black tree
    • union-find

Usage and testing

  • To compile the library, run make, include data_structures.h in your projects.
  • You can run unit tests with make test.

Acknowledgements

This code is inspired by the examples presented in both parts of an online course on Algorithms by Robert Sedgewick and Kevin Wayne. I am very grateful to them for creating such a wonderful resource and making it freely available to all.

data_structures's People

Contributors

almayor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.