⭐Data Structures⭐ are the programmatic way of storing data so that data can be used efficiently. ⭐Algorithm⭐ ⭐is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output.
This repository is open for contributing. You can add new or improve already existing algorithm. I would appreciate if you check out CONTRIBUTING.md file before creating pull request. Thanks for Your time. 😊
This project is customized to build with Gradle Build Tool. Gradle is an open-source build automation tool flexible enough to build almost any type of software 💚
The recommended way to execute any Gradle build is with the help of the Gradle Wrapper. The Wrapper is a script that invokes a declared version of Gradle, downloading it beforehand if necessary. All you need to do is to run commands below:
Wrapper script:
- ./gradlew -> linux/mac OS
- gradlew.bat Windows OS
To build whole project use
./gradlew build
build include:
:build
+--- :assemble
| \--- :jar
| \--- :classes
| +--- :compileJava
| \--- :processResources
\--- :check
\--- :test
+--- :classes
| +--- :compileJava
| \--- :processResources
\--- :testClasses
+--- :compileTestJava
| \--- :classes
| +--- :compileJava
| \--- :processResources
\--- :processTestResources
Run a single algorithm:
./gradlew -PmainClass=<fully-qualified-class-name> runAlgorithm
e.g.
./gradlew -PmainClass=com.marcinseweryn.algorithms.sorting.MergeSort runAlgorithm
Run a single test
./gradlew test --tests com.marcinseweryn.algorithms.sorting.MergeSortTest
e.g.
./gradlew test --tests <fully-qualified-class-name>
Get the test result report in html
./gradlew testReport
- Download and install Java
- Place your class files inside a directory—for example, /home/user/classdir. Note that this directory is the base directory for the package tree. If you add the class com.horstmann.corejava.Employee, then the Employee.class file must be located in the subdirectory /home/user/classdir/com/horstmann/corejava.
- Place any JAR files inside a directory—for example, /home/user/archives.
- Set the class path. The class path is the collection of all locations that can contain class files.
javac -classpath/jar MyProg.java
java -classpath classes/jar MyProg
e.g.
java -classpath /home/user/classdir:.:/home/user/archives/archive.jar MyProg
or
java -classpath c:\classdir;.;c:\archives\archive.jar MyProg
-
SEARCHES