1923 Commits

Author SHA1 Message Date
2418604f7a Add tests for SinglyLinkedList (#3913) 2023-03-12 13:49:17 +02:00
a7e76c57a0 feat: Backtracking algorithms (All combinations) #3912 (#3917)
* ArrayCombination function which uses Combination.java by creating an array of 1 to n

* modified tests
2023-03-11 02:59:49 +05:30
b6563cf37a Add Buffered Reader (#3910) 2023-03-07 10:13:46 +02:00
3e9dd776e5 Make LinkedQueue generic (#3909) 2023-03-05 19:08:42 +00:00
dd949e9b5d Increase test coverage (fixes #3895 #3896) (#3897) 2023-03-05 21:03:08 +02:00
87f9ebcb29 Add Frizzy Number (fixes #3379) (#3906) 2023-03-01 17:16:32 +02:00
f3613382aa Add All Paths from Source to Target (fixes #3359) (#3873) 2023-02-28 12:46:17 +02:00
3499c1bee6 Add postorder binary tree traversal (#3899) 2023-02-27 12:06:39 +00:00
b98dc2c5b5 Fix linear probing hash map (#3902) 2023-02-26 21:15:48 +00:00
45923d6872 Add inorder binary tree traversal (#3898) 2023-02-25 20:58:06 +00:00
6d13d95e41 Graham scan algorithm (#3903)
* Added Graham scan algorithm #3894

* Added Graham scan algorithm (#3894)

---------

Co-authored-by: Stronshade <diegobrocker1999@gmail.com>
2023-02-25 18:31:51 +05:30
be13981e94 Add tests for 2D array binary search (#3892) 2023-02-23 18:49:24 +00:00
6b9eb1b9c1 Add orderAgnosticBinarySearch (#3882)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2023-02-23 17:19:05 +00:00
3c0d94292c Add Introspective Search (#3887) 2023-02-19 21:50:59 +02:00
541f490d1e Valid BST: refactoring + added unit test (#3883)
Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2023-02-17 11:43:17 +00:00
d565edc69a Added recursive&iterative preorder binary tree traversal (#3884)
Added recursive& iterative preorder binary tree traversal
2023-02-17 17:04:44 +05:30
e0b1235bef Fix ArrayIndexOutOfBoundsException in LevenshteinDistance (#3871) 2023-02-15 20:34:36 +00:00
69a428470c Add Tarjans Algorithm (#3874) 2023-02-15 20:27:21 +00:00
a584ca248c Refactor Level Order Traversal (#3869) 2023-02-14 12:33:14 +02:00
c0fec8dfe2 Add Optimal Job Scheduling (#3868) 2023-02-08 18:09:38 +00:00
39df47b5f2 Add Kosaraju Algorithm (#3859) 2023-02-08 18:05:52 +00:00
54d6f79acd Add SimpleSubstitutionCipherTest (#3857) 2023-01-17 22:05:24 +02:00
b14f55096d Fix LFUCache (#3847) 2023-01-15 11:28:16 +02:00
b6c1d250f4 Add Conway Sequence (#3807)
Co-authored-by: Bruno Eloi <bruno.eloi@minfin.fed.be>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2023-01-14 12:22:15 +02:00
d5f140458a Add two algorithms with matrixes (#3364) 2023-01-14 10:01:03 +00:00
351e85d264 Added same trees algorithm check with a unit test (#3845)
Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2023-01-13 20:07:56 +00:00
44c05bf7db Add Shortest Job First Scheduling (#3843) 2023-01-13 21:22:45 +02:00
3b6e3edbfb Vertical order traversal refactoring, added unit test (#3844)
Vertical order traversal refactoring, added test
2023-01-13 19:26:15 +05:30
5aa417b6ae Added Zigzag Traversal of a Binary Tree (#3811)
* Added Zigzag Traversal of a Binary Tree

* fixed file name

Co-authored-by: Albina Gimaletdinova <gimaletdinovaalbina@gmail.com>
2023-01-12 17:36:11 +05:30
64181d6ea7 Remove unnecessary import (#3809) 2023-01-10 09:30:22 +02:00
9d86348cce Update CONTRIBUTING.md (#3486) 2023-01-04 10:13:38 +02:00
1aed52ba58 Trigger builds for all changes 2023-01-04 10:11:45 +02:00
1eedaeb073 Move common tests for sorting algorithms to the base test class (#3782)
* bug fix for CircularBuffer + refactoring + add unit tests

* change Insertion sort to classical implementation + add isSorted function to SortUtils + add SortUtilsRandomGenerator for generating random values and arrays

* little fix

* move all common tests to SortingAlgorithmTest and utilize them

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2023-01-01 14:50:56 +00:00
ce55420418 Add tests for Tree Sort (#3787) 2022-12-31 19:09:09 +00:00
9123474729 Add Leftist Heap (#3789)
Co-authored-by: Adrian Paras <aparas@terpmail.umd.edu>
2022-12-29 12:19:35 +00:00
6a0035d872 Add description for SkipList.java (#3503) 2022-12-28 12:01:05 +00:00
c6694fc1bd Simplifying boolean returns (#3796)
* Simplifying boolean returns

* add comment back
2022-12-18 03:03:09 +00:00
fb09eb289e fix: bug report form error 2022-12-17 19:35:47 -06:00
7fe9928ee8 docs: improve the issue forms (#3797)
* docs: improve the issue forms

* Update directory

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-12-17 18:58:52 +05:30
5512fea0a8 Improve priority queues with max-heap (#3648) 2022-12-13 20:02:15 +02:00
8ba295b1ad Added Order Agnostic Binary Search problem in Searches folder. (#3791)
* Added Order Agnostic Binary Search problem

* Update OrderAgnosticBinSearch.java

* Added JUnit Tests and removed redundant code.

* Made minor changes in JUnit Tests

* Removed tests for main folder and added docs.

* Added OrderAgnosticBinarySearchTest.java

* Renamed file to avoid errors.

* Updated the file to avoid build error
2022-12-12 00:43:27 +05:30
219ec7c223 Create ShellSortTest (#3783)
Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-12-03 13:27:15 +00:00
501aca3e31 Create SimpleSortTest (#3784) 2022-12-03 18:55:00 +05:30
3f7e4d3f8f Simplify Tim Sort (#3780) 2022-11-30 19:05:13 +02:00
6c9090ffed Create BucketSortTest (#3779)
* Create BucketSortTest

* Update src/test/java/com/thealgorithms/sorts/BucketSortTest.java

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-11-28 15:15:06 +05:30
27fc872edb Add JUnit tests for priority queue data structure (#3778) 2022-11-27 19:56:16 +08:00
bdfecbe1c1 Added test cases to CombSort. (#3776)
* Add testcase to CocktailShakerSort Algorithm

* fixed method name to lowerCamelCase

* Added test cases to OddEvenSortTest

* Added test case to CombSort
2022-11-26 15:20:53 +00:00
7692e8f47d Heap Sort: Simplify (#3777)
* bug fix for CircularBuffer + refactoring + add unit tests

* change Insertion sort to classical implementation + add isSorted function to SortUtils + add SortUtilsRandomGenerator for generating random values and arrays

* little fix

* simplify heap sort

* Update src/main/java/com/thealgorithms/sorts/HeapSort.java

* Update src/main/java/com/thealgorithms/sorts/HeapSort.java

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-11-25 22:33:04 +05:30
72468cc707 MergeSort: Simplify merge function (#3774)
* bug fix for CircularBuffer + refactoring + add unit tests

* change Insertion sort to classical implementation + add isSorted function to SortUtils + add SortUtilsRandomGenerator for generating random values and arrays

* little fix

* simplify merge function in MergeSort

* refactor one-liners

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-11-25 03:54:17 +05:30
260f1b2bee Remove duplicate KnapsackMemoization (#3769) 2022-11-19 13:32:01 +02:00