Git Product home page Git Product logo

abstractdatatypes's Introduction

Abstract Data Types

Header files, source code and examples for abstract datatypes implemented entirely in C.

ADTs covered so far:

  • Singly-Linked Lists
  • Doybly-Linked Lists
  • Stacks
  • Queues
  • Chained Hash Tables
  • Binary Trees (in process)
  • Binary Search Trees (in process)

How to use these libraries

You will find most of the information you need in the header files located under AbstractDataTypes/include .

If you're new to C, remember that you must compile and link the source code of the library. It's up to you to write a makefile and/or to make sure that your compiler can find the files and objects you decide to include.

A simple way of compiling and linking the examples provided in this repository using GCC on a Linux distro:

Compile the lib:

$ cd AbstractDataTypes/source
$ gcc -I ../include -c LinkedList.c -o LinkedList.o

Compile and link with the example program:

$ cd ../examples
$ gcc -I ../include ListExample.c ../source/LinkedList.o -o ListExample

Run the program:

$ ./ListExample

About

I created these libraries a while ago for learning data structures and their public interfaces. They had been lying around among other long-forgotten, unfinished projects until I recently started programming again. Since some of my new projects require the use of some of the abstract datatypes for which I had already written some libs, I committed myself to writing cleaner, simpler and self-explaining versions to make them a lot easier to include and use.

Since these libraries were made for my own personal use, I often preferred simplicity over abstraction. You therefore might need to modify these libs to either make them match your specific implementation or to make them more abstract, if you consider it's worth the hassle.

References

I used as references for writing these libraries mainly Kyle Loudon's "Mastering Algorithms with C" and Richard Reese's "Understanding and Using C Pointers", both published by O'Reilly & Associates.

abstractdatatypes's People

Contributors

oliver-almaraz avatar

Stargazers

 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.