62 Commits

Author SHA1 Message Date
fanatixan
03065a43e9 moving heap sort from core-java to algorithms (#5475) 2018-10-17 12:54:35 -07:00
Akash Pandey
fe8488a8d5 Bael 2189: Convert Byte Array To/From hex String (#5396)
* BAEL-2159: Mini Article on "Separate double into integer and decimal parts"

* BAEL-2189: Tutorial to convert Byte Array to/from hex String.

* BEAL-2189: Code review comments incorporated.

* 1. Added validations for Non-Hex String characters in hex String.
2. Moved classes to algorithms module.
3. Renamed unit test class name ends with *UnitTest.

* 1. Added validations for Non-Hex String characters in hex String.
2. Moved classes to algorithms module.
3. Renamed unit test class name ends with *UnitTest.

* removed: redundant property added for local testing.
2018-10-12 21:50:33 +02:00
Loredana Crusoveanu
d385e7bbf5
Merge pull request #5398 from moisko/master
BAEL-2212: Insertion Sort in Java
2018-10-09 12:58:32 +03:00
moisko
178c9435e9 BAEL2212: implement insertion sort in imperative and recursive way 2018-10-08 16:49:36 +03:00
Loredana Crusoveanu
1a4fe225af
Merge pull request #5042 from fmm/patch-1
Update FindKthLargest.java
2018-10-05 15:54:56 +03:00
dionisPrifti
ea22559064 BAEL-2209 : Quicksort Dionis Prifti (#5365)
* Merged changes from the original repository.

* Added event streaming example with WebFlux.

* Deleted auto-generated code.

* Deleted auto-generated code.

* BAEL-2209 : Added java class and JUnit test for QuickSort implementation.

* Revert "Added event streaming example with WebFlux."

This reverts commit 21527b34643bbb0d1437a0ab3ef392024a391107.

* BAEL-2209: Removed main method from Quicksort class.

* BAEL-2209 : Added the implementation and unit test for 3-Way Quicksort.
2018-10-01 19:41:18 -07:00
Vaibhav Sahay
a4521a9b04
Merge pull request #1 from eugenp/master
sync repo
2018-09-29 15:59:41 +05:30
Vaibhav Sahay
191b27a8c5
initial commit 2018-09-29 15:22:22 +05:30
Shubhra Srivastava
12124f30cb BAEL-2153 : Check If Rectangles Overlap In Java (#5200)
* BAEL-2153 : Check If Rectangles Overlap In Java

* BAEL-2153 : Moving to Algorithms repo
2018-09-08 21:19:36 -07:00
myluckagain
86aaeed8e1 BAEL-2155 (#5149) 2018-09-03 20:34:21 +02:00
Predrag Maric
a32904fc19
BAEL-2151 code moved to algorithms module (#5141) 2018-09-02 12:06:04 +02:00
Loredana Crusoveanu
aa8afa5b6e fix package, fix get random node 2018-08-25 20:36:12 +03:00
kartiksingla
b8ae8ace4a [BAEL-2141] - How to check if a string contains all the letters of the alphabet? 2018-08-23 21:44:01 +05:30
Filipe Martins
b1fd7611b2
Update FindKthLargest.java
Fix random pivot
2018-08-23 08:44:03 -03:00
amit2103
d268ffa5c9 [BAEL-7670] Added logback.xml in missing modules in src/main/resources 2018-08-05 18:40:49 +05:30
Jonathan Cook
b44883b364 BAEL-1889 - Let's move the Java Number articles into a new module (#4619)
* BAEL-1849 - Convert from String to Date in Java

* BAEL-1863 - Calling Callbacks with Mockito

* BAEL-1889 - Let's move the Java Number articles into a new module

* BAEL-1889 - Let's move the Java Number articles into a new module
2018-07-14 15:00:37 +02:00
Loredana Crusoveanu
8a2514d019
Merge pull request #4317 from meltahawy/patch-1
Typo
2018-07-03 21:58:33 +03:00
Eric Martin
b1d194cdb5 BAEL-1815: RomanNumeral and RomanArabicConverter (#4565)
* BAEL-1815: RomanNumeral and RomanArabicConverter

* Refactored getReverseSortedValues
2018-06-29 05:59:08 +02:00
Predrag Maric
122a43a5d6
Bael 1773 refactor (#4498)
* Strange git issue with README.MD, wouldn't revert the file

* BAEL-1773 Coe moved to algorithm module
2018-06-17 12:56:31 +02:00
jjangga0214
b22cd9e63b fix mistyped word (#4408) 2018-06-08 18:24:04 +02:00
Mohamed El Tahawy
5a92adbc39
Typo
"oponent" to "opponent"
2018-05-22 16:18:23 +04:00
Jorge
5b5386636b [BAEL-1641] Find all pairs of numbers in an array that add up to a given sum (#3890)
* [BAEL-1641] Find all pairs of numbers in an array that add up to a given sum

* Commiting editor's suggested changes

* Commiting article Spring Data Reactive Mongo DB microservice in Kotlin

* Revert commit for BAEL 1687 - Moving those files to a new branch

* Use AssertJ and BDD-style on unit testing
2018-04-21 08:45:15 -05:00
Predrag Maric
89f1c2721e
BAEL-1498 Money into words (#3797)
* Add tradukisto library

* Implement MoneyIntoWords

* Update the version of tradukisto library

* Refactor MoneyIntoWords

* Refactor

* Refactor pom.xml

* Refactor pom.xml

* Refactor NumberWordConverter

* BAEL-1498 Small refactoring

* Test edge cases

* BAEL-1498 Additional tests
2018-03-10 20:20:04 +01:00
Donato Rimenti
67599b1cbc - Extracted fitness function to separate class instead of Lambda
- Cleaned up javadoc
- Refactored fitness function code to add more significative variables names
2018-02-24 14:06:57 +01:00
Donato Rimenti
b0d83a88be BAEL-1352 Multiswarm optimization algorithm. 2018-02-22 21:04:34 +01:00
iaforek
a27e73a57f BAEL-1298 - Variable renames (#3653)
* Code for Dependency Injection Article.

* Added Java based configuration. Downloaded formatter.xml and reformatted
all changed files. Manually changed tab into 4 spaces in XML
configuration files.

* BAEL-434 - Spring Roo project files generated by Spring Roo. No
formatting applied. Added POM, java and resources folders.

* Moved project from roo to spring-roo folder.

* BAEL-838 Initial code showing how to remove last char - helper class and tests.

* BAEL-838 Corrected Helper class and associated empty string test case. Added StringUtils.substing tests.

* BAEL-838 Refromatted code using formatter.xml. Added Assert.assertEquals import. Renamed test to follow convention. Reordered tests.

* BAEL-838 - Added regex method and updated tests.

* BAEL-838 Added new line examples.

* BAEL-838 Renamed RemoveLastChar class to StringHelper and added Java8 examples. Refactord code.

* BAEL-838 Changed method names

* BAEL-838 Tiny change to keep code consistant. Return null or empty.

* BAEL-838 Removed unresolved conflict.

* BAEL-821 New class that shows different rounding techniques. Updated POM.

* BAEL-821 - Added unit test for different round methods.

* BAEL-821 Changed test method name to follow the convention

* BAEL-821 Added more test and updated round methods.

* BAEL-837 - initial commit. A few examples of adding doubles.

* BAEL-837 - Couple of smaller changes

* BAEL-837 - Added jUnit test.

* BAEL-579 Updated Spring Cloud Version

I was getting error: java.lang.NoSuchMethodError:
org.springframework.cloud.config.environment.Environment
After version update, all is okay.

* BAEL-579 Added actuator to Cloud Config Client.

* BAEL-579 Enabled cloud bus and updated dependencies.

* BAEL-579 Config Client using Spring Cloud Bus.

* BAEL-579 Recreated Basic Config Server.

* BAEL-579 Recreated Config Client.

* BAEL-579 Removed test Git URL.

* BAEL-579 Added Actuator to Config Client

* BAEL-579 Added Spring Cloud Bus to Client.

* BAEL-579 Server changes for Spring Cloud Bus

Added dependencies and removed git.clone-on-start as this was causing
server to throw errors after git properties change.

* BAEL-579 Removed Git URL.

* Revert "BAEL-579 Updated Spring Cloud Version"

This reverts commit f775bf91e53a1ecfb9b70596688d7c8202bf495f.

* Revert "BAEL-579 Config Client using Spring Cloud Bus."

This reverts commit 1d96bc5761994a33af9a7a9aa5ab68604a5b44dc.

* Revert "BAEL-579 Enabled cloud bus and updated dependencies."

This reverts commit 7845da922d89d53506dd0fff387ea13694c50bc1.

* Revert "BAEL-579 Added actuator to Cloud Config Client."

This reverts commit 076657a26a57e0aa676989a4d97966a3b9d53e1c.

* BAEL-579 Added missing dependency versions.

* BAEL-579 Added missing dependency versions.

* Updated gitignore

* BAEL-1065 Simple performance check StringBuffer vs StringBuilder.

* BAEL-1065 Added JMH benchmarks

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Dancing Links Algorithm. Smaller changes to Backtracking

* BAEL-1298 Resolve conflict - use most up-to-date POM

* Updated code - mostly with CONSTANTS. Extracted methods.

* Removed pointless Java8 code. Renamed constant

* Extracted 'constraints' methods and renamed coverBoard variable

* Extracted 'constraints' methods and renamed coverBoard variable

* Renamed variables

* More variable renames
2018-02-16 07:13:26 +01:00
iaforek
0743dec07c Extracted 'constraints' methods and renamed variables (#3580)
* Code for Dependency Injection Article.

* Added Java based configuration. Downloaded formatter.xml and reformatted
all changed files. Manually changed tab into 4 spaces in XML
configuration files.

* BAEL-434 - Spring Roo project files generated by Spring Roo. No
formatting applied. Added POM, java and resources folders.

* Moved project from roo to spring-roo folder.

* BAEL-838 Initial code showing how to remove last char - helper class and tests.

* BAEL-838 Corrected Helper class and associated empty string test case. Added StringUtils.substing tests.

* BAEL-838 Refromatted code using formatter.xml. Added Assert.assertEquals import. Renamed test to follow convention. Reordered tests.

* BAEL-838 - Added regex method and updated tests.

* BAEL-838 Added new line examples.

* BAEL-838 Renamed RemoveLastChar class to StringHelper and added Java8 examples. Refactord code.

* BAEL-838 Changed method names

* BAEL-838 Tiny change to keep code consistant. Return null or empty.

* BAEL-838 Removed unresolved conflict.

* BAEL-821 New class that shows different rounding techniques. Updated POM.

* BAEL-821 - Added unit test for different round methods.

* BAEL-821 Changed test method name to follow the convention

* BAEL-821 Added more test and updated round methods.

* BAEL-837 - initial commit. A few examples of adding doubles.

* BAEL-837 - Couple of smaller changes

* BAEL-837 - Added jUnit test.

* BAEL-579 Updated Spring Cloud Version

I was getting error: java.lang.NoSuchMethodError:
org.springframework.cloud.config.environment.Environment
After version update, all is okay.

* BAEL-579 Added actuator to Cloud Config Client.

* BAEL-579 Enabled cloud bus and updated dependencies.

* BAEL-579 Config Client using Spring Cloud Bus.

* BAEL-579 Recreated Basic Config Server.

* BAEL-579 Recreated Config Client.

* BAEL-579 Removed test Git URL.

* BAEL-579 Added Actuator to Config Client

* BAEL-579 Added Spring Cloud Bus to Client.

* BAEL-579 Server changes for Spring Cloud Bus

Added dependencies and removed git.clone-on-start as this was causing
server to throw errors after git properties change.

* BAEL-579 Removed Git URL.

* Revert "BAEL-579 Updated Spring Cloud Version"

This reverts commit f775bf91e53a1ecfb9b70596688d7c8202bf495f.

* Revert "BAEL-579 Config Client using Spring Cloud Bus."

This reverts commit 1d96bc5761994a33af9a7a9aa5ab68604a5b44dc.

* Revert "BAEL-579 Enabled cloud bus and updated dependencies."

This reverts commit 7845da922d89d53506dd0fff387ea13694c50bc1.

* Revert "BAEL-579 Added actuator to Cloud Config Client."

This reverts commit 076657a26a57e0aa676989a4d97966a3b9d53e1c.

* BAEL-579 Added missing dependency versions.

* BAEL-579 Added missing dependency versions.

* Updated gitignore

* BAEL-1065 Simple performance check StringBuffer vs StringBuilder.

* BAEL-1065 Added JMH benchmarks

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Dancing Links Algorithm. Smaller changes to Backtracking

* BAEL-1298 Resolve conflict - use most up-to-date POM

* Updated code - mostly with CONSTANTS. Extracted methods.

* Removed pointless Java8 code. Renamed constant

* Extracted 'constraints' methods and renamed coverBoard variable

* Extracted 'constraints' methods and renamed coverBoard variable
2018-02-08 07:26:42 +01:00
deep20jain
efb66e3001 Bael 1299 - Maze Solver - deep20jain@gmail.com (#3537)
* Maze solver using DFS

* Adding BFS maze solver

* Fixing formatting
2018-02-06 21:07:38 +01:00
Grzegorz Piwowarek
43a4d08c36
Sudoku refactor (#3556)
* BacktrackingAlgorithm refactor

* DancingLinks refactor
2018-01-31 18:50:37 +01:00
iaforek
f6cfff3f9d BAEL-1298 - How to create a Sudoku solver (#3197)
* Code for Dependency Injection Article.

* Added Java based configuration. Downloaded formatter.xml and reformatted
all changed files. Manually changed tab into 4 spaces in XML
configuration files.

* BAEL-434 - Spring Roo project files generated by Spring Roo. No
formatting applied. Added POM, java and resources folders.

* Moved project from roo to spring-roo folder.

* BAEL-838 Initial code showing how to remove last char - helper class and tests.

* BAEL-838 Corrected Helper class and associated empty string test case. Added StringUtils.substing tests.

* BAEL-838 Refromatted code using formatter.xml. Added Assert.assertEquals import. Renamed test to follow convention. Reordered tests.

* BAEL-838 - Added regex method and updated tests.

* BAEL-838 Added new line examples.

* BAEL-838 Renamed RemoveLastChar class to StringHelper and added Java8 examples. Refactord code.

* BAEL-838 Changed method names

* BAEL-838 Tiny change to keep code consistant. Return null or empty.

* BAEL-838 Removed unresolved conflict.

* BAEL-821 New class that shows different rounding techniques. Updated POM.

* BAEL-821 - Added unit test for different round methods.

* BAEL-821 Changed test method name to follow the convention

* BAEL-821 Added more test and updated round methods.

* BAEL-837 - initial commit. A few examples of adding doubles.

* BAEL-837 - Couple of smaller changes

* BAEL-837 - Added jUnit test.

* BAEL-579 Updated Spring Cloud Version

I was getting error: java.lang.NoSuchMethodError:
org.springframework.cloud.config.environment.Environment
After version update, all is okay.

* BAEL-579 Added actuator to Cloud Config Client.

* BAEL-579 Enabled cloud bus and updated dependencies.

* BAEL-579 Config Client using Spring Cloud Bus.

* BAEL-579 Recreated Basic Config Server.

* BAEL-579 Recreated Config Client.

* BAEL-579 Removed test Git URL.

* BAEL-579 Added Actuator to Config Client

* BAEL-579 Added Spring Cloud Bus to Client.

* BAEL-579 Server changes for Spring Cloud Bus

Added dependencies and removed git.clone-on-start as this was causing
server to throw errors after git properties change.

* BAEL-579 Removed Git URL.

* Revert "BAEL-579 Updated Spring Cloud Version"

This reverts commit f775bf91e53a1ecfb9b70596688d7c8202bf495f.

* Revert "BAEL-579 Config Client using Spring Cloud Bus."

This reverts commit 1d96bc5761994a33af9a7a9aa5ab68604a5b44dc.

* Revert "BAEL-579 Enabled cloud bus and updated dependencies."

This reverts commit 7845da922d89d53506dd0fff387ea13694c50bc1.

* Revert "BAEL-579 Added actuator to Cloud Config Client."

This reverts commit 076657a26a57e0aa676989a4d97966a3b9d53e1c.

* BAEL-579 Added missing dependency versions.

* BAEL-579 Added missing dependency versions.

* Updated gitignore

* BAEL-1065 Simple performance check StringBuffer vs StringBuilder.

* BAEL-1065 Added JMH benchmarks

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Sudoku - Backtracking Algorithm

* BAEL-1298 Dancing Links Algorithm. Smaller changes to Backtracking

* BAEL-1298 Resolve conflict - use most up-to-date POM

* Updated code - mostly with CONSTANTS. Extracted methods.

* Removed pointless Java8 code. Renamed constant
2018-01-30 19:13:53 +01:00
Mansi
21c41cfd99 BAEL-1297 Find kth largest element in a sequence of numbers (#3332)
* Example Code For Evaluation Article

This is an example code for the evaluation article on "Different Types of Bean Injection in Spring"

* Added unit tests

* Minor changes to application context

* Removed code committed for evaluation article

* BAEL-944 Demonstrating the problems with new Url pattern matching in Spring 5

* BAEL-944 Demonstrating the problems with new Url pattern matching in Spring 5

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Code Formatting and solving build issue

* BAEL-944 Resolving build issue due to change in Spring version

* BAEL-944 Resolving build issue

* BAEL-944 Formatting code

* BAEL-944 Moving tests to correct package

* BAEL-944 Moving tests to correct package

* BAEL-944 Replacing @RequestMapping by @GetMapping

* BAEL-944 Remove unnecessary attribute name, "value" in annotations

* BAEL-79 Intro to Activiti with Spring

* BAEL-79 Intro to Activiti with Spring

* BAEL-79 Adding activiti module to the parent modules

* BAEL-79 Using latest version

* BAEL-79 Update Spring boot version that works with Activiti

* BAEL-79 Replace RequestMapping with GetMapping

* BAEL-79 Use Java 8 Syntax

* BAEL-79 Formatting

* BAEL-79 changed module name

* BAEL-378 A Guide to Activiti with Java

* BAEL-79 Fixed unit tests

* BAEL-79 Simplified the process

* BAEL-79 Fix test cases

* BAEL-1045 Lambda Behave

* BAEL-1045 Lambda Behave

* BAEL-1045 Lambda Behave

* BAEL-1090 Difference between compact and compressed strings in Java 9

* BAEL-1237 String Formatter

* BAEL-1237 String Formatter

* BAEL-1237 String Formatter

* BAEL-1237 String Formatter

* BAEL-1237 Guide to java.util.Formatter

* BAEL-1297 Find kth largest element in a sequence of numbers

* BAEL-1297 fixed issues and modified file name

* BAEL-1297 Modified randomized quickselect

* BAEL-1297 added additional sorting method

* BAEL-1297 UnitTest fix

* BAEL-1297 Additional method

Added QuickSelect With Iterative Partition method

* BAEL-1297 Added AssertJ annotations

* BAEL-1297 added missing assertj dependancy
2018-01-05 20:38:02 -06:00
Muhammed Almas
a38e6e295e BAEL-1296 Prime numbers till n. (#2956)
* BAEL-1296 Prime numbers till n.

* BAEL-1296 Renamed packge
2017-11-09 20:54:36 +01:00
Grzegorz Piwowarek
1da6e1df42 EditDistance refactor (#2853) 2017-10-25 20:18:33 +02:00
deep20jain
5d39af398f BAEL 1143 - Edit Distance - deep20jain@gmail.com (#2718)
* Calculate edit distance

* Fixing formatting

* Making variable local to method
2017-10-24 05:36:28 +02:00
Grzegorz Piwowarek
a7282d233b Bubble sort fix (#2809) 2017-10-22 14:17:45 +02:00
Grzegorz Piwowarek
f753a86e84 Refactor RxJava (#2749)
* Refactor RxJava

* Merge fix
2017-10-18 17:13:04 +02:00
Parth Karia
eece3d02ba BAEL-1211 Bubble Sort in Java (#2744)
* BAEL-815 Introduction to JGraphT

* BAEL-815 Move code from libraries to algorithms

* BAEL-1211 Bubble Sort in Java

* BAEL-1211 Bubble Sort in Java

* BAEL-1211 Bubble Sort in Java

* BAEL-1211 Bubble Sort in Java

* BAEL-1211 Fix conflict
2017-10-15 09:57:01 -07:00
deep20jain
cccd6a3eab BAEL 1123 - deep20jain@gmail.com (#2572)
* Adding node and cycle detection by hashing

* Adding implementation for all algorithms for cycle detection and removal

* Applying formatting rules

* Refactoring methods and adding more tests

* Fixing infinite loop corner case
2017-09-08 19:23:55 +02:00
deep20jain
d8398caaa2 BAEL-1123 - Testing Linked List for Cycles - deep20jain@gmail.com (#2525)
* Adding node and cycle detection by hashing

* Adding implementation for all algorithms for cycle detection and removal

* Applying formatting rules
2017-09-03 22:20:25 +02:00
Shivang Sarawagi
d635e9a245 binary search folder created (#2541)
* binary search folder created

* Binary search test updated
2017-09-01 17:40:09 -07:00
Ante Pocedulic
085cef8fb3 string search algorithms article (#2460)
* - added code for string search algorithms article
- added tests

* - fixed algorithm for finding prime numbers
2017-08-30 14:35:20 +02:00
Shivang Sarawagi
15666e8ed4 Binary Search Algorithm (#2452)
* Binary search

* deleting previous files

* BinarySearch along with the test case
2017-08-23 20:14:49 +02:00
Shivang Sarawagi
da3273af6e Binary Search algorithm (#2448) 2017-08-15 22:56:42 -07:00
Parth Karia
a219184b46 BAEL-1004 changes in variable names (#2238) 2017-07-09 12:23:21 +02:00
Grzegorz Piwowarek
c99bb7fced Minimax refactor (#2212) 2017-07-06 12:01:49 +02:00
Parth Karia
2f83bec231 BAEL-1004 (#2206)
* Dependency Injection examples

Dependency Injection examples for evaluation article

* Junit test cases added for dependency injection

Junit test cases added for dependency injection

* ClassNotFoundException vs NoClassDefFoundError

Example to reproduce ClassNotFoundException & NoClassDefFoundError

* JUnit test cases for ClassNotFoundException & NoClassDefFoundError

test cases to reproduce ClassNotFoundException & NoClassDefFoundError

* Deleting exampls for evaluation article

* BAEL-831 Examples for ClassNotFoundException & NoClassDefFoundError

* BAEL-831 Removed wrapper class

* Removing evaluation article example

* BAEL-875 - Hill Climbing Algorithm

BAEL-875 - Implementation for Hill Climbing Algorithm

* BAEL-875 removed unused imports

* BAEL-984 Monte Carlo tree search

BAEL-984 Implementation for tic tac toe using Monte Carlo tree search

* BAEL-984	 test cases for MCTS

BAEL-984 test cases for Monte Carlo tree search implementation

* BAEL-1004

Implementation of Minimax algorithm
2017-07-05 09:54:46 +02:00
Grzegorz Piwowarek
ef7400484c Algorithms refactor (#2136) 2017-06-23 10:18:04 +02:00
Parth Karia
1b0d5f0b73 BAEL-984 Monte Carlo tree search (#2129)
* BAEL-984 Monte Carlo tree search

BAEL-984 Implementation for tic tac toe using Monte Carlo tree search

* BAEL-984	 test cases for MCTS

BAEL-984 test cases for Monte Carlo tree search implementation
2017-06-22 22:51:43 +02:00
Parth Karia
4552b8088c BAEL-875 code refactoring (#2030)
Hill-Climbing refactor
2017-06-09 14:57:29 +02:00
Grzegorz Piwowarek
41c35cea8b Hill-Climbing refactor (#2014)
* Rename test class

* HC Refactor

* refactor
2017-06-08 17:04:30 +02:00