Git Product home page Git Product logo

doubly-linked-list-api's Introduction

#Doubly Linked List C-API# A doubly linked list C-API that can accept any data type that is wrapped within a struct and provides a set of requested methods.
It is implemented with opaque pointers for abstraction and security.

Introducing version 2.1 - Iterators

A brief changelog

  1. Added support for iterators (look below for more info)
  2. Changed ugly dllistptr to a more [user and C]-friendly naming convention, that is list_t (important)
  3. Renamed the API files to a more C-like naming convention, like this: doubly_linked_list_adt.c/h
  4. Updated demo to include some of the iterator functionality
  5. This version was extensively tested with a multithreaded project, that used the list with about 10 datatypes
  6. Added a copy-constructor-like method to copy lists
  7. Binary search to access find the associated element in the list of iterators
  8. In big programs, compile with -O2 or -O3 to see the magic

Changelog

[*] 2.1 - Upgraded search/ access of iterators (from linear to binary search)
[*] 2.0 - Iterators support
[*] 1.0 - Initial release

##Getting started with the API

  1. You will need to copy the doubly_linked_list_adt.c and doubly_linked_list_adt.h files to your project and include the header file to your source code

  2. Implement the required functions for the API, stated here, in a source file and provide the prototypes in a header file

  3. To use a list, declare a list_t variable and pass it to dll_init function

  4. Declare and prepare a Datatype dummy variable, allocate it with your function and call any of the dll_insert* variants (depending on your needs)

    N.B.: To add other elements to the list, don't allocate an object again, just update the previous one to insert it

  5. When you're done with your list, only then you call the free_datatype function you've written

  6. Finally, pass the list_t variable to dll_destroy function to deallocate the memory needed

##Documentation for each aspect of the project can be found here


For anything you might need, suggestion, bug report, create a new issue or a pull-request

doubly-linked-list-api's People

Contributors

chris-asl avatar jasonpap 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.