Skip to content

rdegbe/java-algos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 

Repository files navigation

License: MIT

Algorithms & data structures project

Algorithms and data structures are basic to effective code and great programming plan. Making and planning great algorithms is needed for being a commendable developer. This repository's aim is to show how to accurately carry out common data structures and algorithms in the easiest and most rich manners.

Running an algorithm implementation

To compile and run any of the algorithms here, you need at least JDK version 8. Gradle can make things more convenient for you, but it is not required.

Running with Gradle (recommended)

This project supports the Gradle Wrapper. The Gradle wrapper automatically downloads Gradle at the first time it runs, so expect a delay when running the first command below.

If you are on Windows, use gradlew.bat instead of ./gradlew below.

Run a single algorithm like this:

./gradlew run -Palgorithm=<algorithm-subpackage>.<algorithm-class>

Alternatively, you can run a single algorithm specifying the full class name

./gradlew run -Pmain=<algorithm-fully-qualified-class-name>

For instance:

./gradlew run -Palgorithm=search.BinarySearch

or

./gradlew run -Pmain=com.raymond.algorithms.search.BinarySearch

Compiling and running with only a JDK

Create a classes folder

cd algo-compilation
mkdir classes

Compile the algorithm

javac -sourcepath src/main/java -d classes src/main/java/ <relative-path-to-java-source-file>

Run the algorithm

java -cp classes <class-fully-qualified-name>

Example

$ javac -d classes -sourcepath src/main/java src/main/java/com/raymond/algorithms/search/BinarySearch.java
$ java -cp classes com.raymond.algorithms.search.BinarySearch

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.

About

Compilation of Data Structures and Algorithms Implementation written in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages