Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ Java.iml
.idea/*
out/
*.iml
.gradle
target
build
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'java'
}

repositories {
mavenLocal()
maven {
url = 'http://repo.maven.apache.org/maven2'
}
}

dependencies {
testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.0'
}

group = 'algorithm'
version = '1.0-SNAPSHOT'
description = 'java-algorithm'
sourceCompatibility = '1.8'
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
172 changes: 172 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 0 additions & 64 deletions pom.xml

This file was deleted.

5 changes: 5 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
* This file was generated by the Gradle 'init' task.
*/

rootProject.name = 'java-algorithm'
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal
* with the problem of creating objects without having to specify the exact class of the object that will be created.
* This is done by creating objects by calling a factory methodeither specified in an interface and implemented by
* child classes, or implemented in a base class and optionally overridden by derived classesrather than by calling
* This is done by creating objects by calling a factory method-either specified in an interface and implemented by
* child classes, or implemented in a base class and optionally overridden by derived classes-rather than by calling
* a constructor.
*
* @see <a href="https://en.wikipedia.org/wiki/Factory_method_pattern">Factory Pattern</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

/**
* An Adapter pattern acts as a connector between two incompatible interfaces that otherwise cannot be connected
* directly. An Adapter wraps an existing class with a new interface so that it becomes compatible with the clients
* directly. An Adapter wraps an existing class with a new interface so that it becomes compatible with the client's
* interface.
* <br>
* The main motive behind using this pattern is to convert an existing interface into another interface that the client
* expects. Its usually implemented once the application is designed.
* expects. It's usually implemented once the application is designed.
*
* @see <a href="https://en.wikipedia.org/wiki/Adapter_pattern">Adapter Pattern</a>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sorts/PigeonholeSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PigeonholeSort {
* Pigeonhole sorting is a sorting algorithms that is suitable for sorting lists of elements where the number
* of elements and the number of possible key values are approximately the same.
* <p>
* It requires O(n + Range) time where n is number of elements in input array and Range is number of possible
* It requires O(n + Range) time where n is number of elements in input array and 'Range' is number of possible
* values in array.
*
* @param arr The array to be sorted
Expand Down