Giter Site home page Giter Site logo

datastructures's Introduction

Datastructures and Algorithms

Solving data-structures and algorithms problems in Java and Python.

Problems

Questions picked up from https://www.geeksforgeeks.org, https://www.hackerrank.com.

Information

The programs have been divided according to data-structures as can be seen from the packages created. Please do not use the archives folder for adding any code. You can also add certain concepts implemented through code.

How to run

Clone the repository using the following command:

$ git clone https://github.com/SiddharthaAnand/datastructures.git

Switch directory inside the cloned directory:

$ cd datastructures

In order to run any file(BinarySearch.java), type the following command:

$ javac -d . BinarySearch.java
$ java arrays.BinarySearch

The command will create a package named arrays in your local directory and put the class file inside that directory. You can add the class files inside .gitignore file.

Utilities.java

This java file contains the typical common methods that are required in almost every code that is written in this repository. For example, taking an input, printing on a new line or printing text along with a data-structure.

Stub.java

This class contains method to generate a random valued array, given the size and the max value you want in the array. It uses the built-in Random class to generate the values. It also has a method to print the values of a given input array along with a text given as formal parameter.

Contribution

Feel free to refactor code, report bugs, submit pull requests or just send a suggestion.

How to contribute

Any code that you add needs to have a proper directory name. The directory names can be one of the following:

  • name of the data-structure (arrays/)
  • name of an algorithm/design paradigm (divide-and-conquer/) Do add easy-to-understand comments at the beginning of the code to understand the question, input and output of the program.

To-dos

  • Add a Utilities.java file which can be used anywhere in the repository.
  • Add other data-structures like Strings, Linked-lists and Trees. (In progress)
  • Add advanced data-structures like Red-Black trees.
  • Add algorithms related to graphs.
  • Add design patterns examples
  • Add language-specific usages of certain common classes(ex. Comparable and Comparator in Java).

datastructures's People

Contributors

khusbu avatar kunal-kushwaha avatar siddharthaanand 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.