GithubHelp home page GithubHelp logo

iwatakeshi / data-structures Goto Github PK

View Code? Open in Web Editor NEW

This project forked from williamfiset/deprecated-data-structures

0.0 2.0 0.0 187.81 MB

A collection of powerful data structures

License: MIT License

Java 100.00%

data-structures's Introduction

Travis License: MIT

The data structures project

Data structures are amongst the most fundamental ingredients in the recipe for efficient algorithms and good software design. Knowledge of how to create and design excellent data structures is an essential skill required in becoming an exemplary programmer. The goal of this repository is to provide a complete and thorough explanation of the most common data structures.

Data Structures

Contributing

This repository is contribution friendly 😃. If you're a data structures enthusiast (like me!) and want to add or improve a data structure your contribution is welcome! Please be sure to include tests 😘

For developers

This project uses Gradle as a build system and for testing. To get started install the gradle command-line tool and run the build command to make sure you don't get any errors:

data-structures$ gradle build

Adding a new data structure

The procedure to add a new data structure named Foo is the following:

  1. Create a new folder called Foo in com/williamfiset/datastrutures/Foo
  2. Add the data structure implementation for Foo in com/williamfiset/datastrutures/Foo/Foo.java
  3. Add tests for Foo in javatests/com/williamfiset/datastrutures/Foo/FooTest.java
  4. Edit the build.gradle file and add Foo to the project.
  5. Add tests for your data structure 😘
  6. Send pull request for review 😮

Testing

This repository places a large emphasis on good testing practice to ensure that published data structures are bug free and high quality. Testing is done using a combinations of frameworks including: JUnit, Mockito and the Google Truth framework, but mostly JUnit.

When developing you likely do not want to run all tests but only a subset of them. For example, if you want to run the LinkedListTest.java file under javatests/com/williamfiset/datastructures/linkedlist/LinkedListTest.java you can execute:

data-structures$ gradle test --tests "javatests.com.williamfiset.datastructures.linkedlist.LinkedListTest"

Sometimes there are many test files for one data structure. One example is the 🌲FenwickTree🌲 which currently has two test files: FenwickTreeRangeQueryPointUpdateTest.java and FenwickTreeRangeUpdatePointQueryTest.java, in which case you can specify a glob expression to capture all the appropriate test files:

gradle test --tests "javatests.com.williamfiset.datastructures.fenwicktree.FenwickTree*Test"

License

This repository is released under the MIT license. In short, this means you are free to use this software in any personal, open-source or commercial projects. Attribution is optional but appreciated.

data-structures's People

Contributors

williamfiset avatar micahstairs avatar braj065 avatar finnlidbetter avatar janclarin avatar

Watchers

James Cloos avatar Takeshi 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.