nmante / algos

A library containing common data structures and algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algorithms and Data Structures

This repo contains common algorithms and data structures.

Context: I started developing this library/code as a way to study for interviews.

Installation

OSX/Linux Installation

To install the library, run these commands:

git clone https://github.com/nmante/algos
cd algos
make
make install

Running make will generate a few things:

  • A library that you can use in your own programs libalgos.a
  • A set of tests algos-tests.out.

Running make install will move all the necessary headers & libraries to the /usr/local/include/algos and /usr/local/lib, respectively.

These compiled libraries/executable files will sit in the bin directory.

Usage

To see a simple usage of this library, go ahead and run these commands:

cd example
make
./algos.out

The source code for the example is in example/main.cpp. Also, I've included a sample Makefile so you can see how to include it in your own projects.

OSX/Linux Uninstall

To uninstall, simply run:

make uninstall

in the repo directory (i.e. in algos dir).

This will remove the header folder and library file from /usr/local/include/algos and /usr/local/lib/libalgos.a, respectively.

Library Contents

This contains a list of data structures and algorithms in this library. This list will be updated as more stuff is added!

Data Structures

  • Graphs
  • Trees
    • AVL Trees
    • Red Black Trees
  • Heaps
    • Min Heap
    • Max Heap
  • Linked Lists
    • Single
    • Double
    • Circular
  • Hashes
    • HashTable
    • HashSet
    • HashTree

Algorithms

  • Search
    • Binary
    • Interpolative
    • Kth Largest
  • Sorting
    • MergeSort
    • Insertion Sort
    • Heap Sort
    • Quick Sort

About

A library containing common data structures and algorithms


Languages

Language:C++ 99.3%Language:Makefile 0.5%Language:Shell 0.2%