90 Commits

Author SHA1 Message Date
06aa834fa6 Enhance queue README.md (#4710) 2023-10-08 10:47:35 +03:00
7f9555bd94 Update stack readme.md (#4678) 2023-10-07 20:37:57 +03:00
06d6e2116b Update Readme.md (#4634) 2023-10-05 16:08:28 +03:00
9795bada90 Update Readme.md (#4561) 2023-10-03 14:22:19 +00:00
536978919d Add reverse k group in LinkedList algorithm (#4532) 2023-10-03 09:43:49 +03:00
edb0489440 [FEATURE] #4486 QuickSort Algo for LinkedList (#4487)
* Added code to find Articulation Points and Bridges

* tried to solve clang-formant test

* removed new line at EOF to get lint to pass

* feature: Added Ahocorasick Algorithm

* fixed lint using clang-format

* Added QuickSort Algorithm for linked list

* removed datastructures/graphs/ArticulationPointsAndBridges and string/AhoCorasick.java from this branch

* Added datastructures/lists/SinglyLinkedList class, Replaced ListNode class

* Modified some comments

* Added tests in QuickSortLinkedListsTest.java

* removed main as added a test file to test test-cases

* test file for QuickSortLinkedLinst.java
2023-10-01 16:01:32 +00:00
26c2465328 Moved StackPostfixNotation.java from the Others section to the Stack section (#4372)
* Moved StackPostfixNotation.java from the Others section to the Stack section

* Put all stack related algo in a separate stack directory in the algorithms directory. The stack directory under data-structures now only contains various implementations of the stack data structure.

* formatted files
2023-09-18 21:27:36 +02:00
94621fb63e Enhancing DisjointSetUnion data structure (#4366)
* Enhancing DisjointSetUnion data structure

* Linter resolved

* Linter resolved

* Linter resolved

* Linter resolved

* Added next line

* added next Line

* Resolve review comments

---------

Co-authored-by: Bama Charan Chhandogi <b.c.chhandogi@gmail.com>
2023-09-10 22:30:35 +05:30
09950d6097 Add Rotate a Linkedlist (#4345) 2023-09-02 19:32:28 +00:00
f010a47608 chore: enforce InsertNewlineAtEOF in clang-format (#4343)
* style: insert newline at eof

* style: use `InsertNewlineAtEOF` in `clang-format`

* fix: use `clang-format-16`

* chore: update clang-format-lint-action to v0.16.2

---------

Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
2023-09-01 04:10:46 +00:00
ea15f2bd98 Make SinglyLinkedList Iterable (#4334) 2023-08-28 07:11:07 +00:00
18848574be Make DFS and BFS search algorithms generic (fixes #4229) (#4230) 2023-08-13 11:59:26 +05:30
4fe419ebd8 Add Recursive Reverse of Linked List (#4292)
Co-authored-by: BamaCharanChhandogi <b.c.chhandogi@gmailcom>
2023-08-10 11:38:56 +03:00
cc9afea036 Fix formatting (#4259)
Co-authored-by: Ranjeet Kumar Jena <ranjeetjena06@gmai.com>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2023-07-27 08:50:47 +05:30
ef4ef42ed3 Remove duplicated lines (#4258)
Co-authored-by: Ranjeet Kumar Jena <ranjeetjena06@gmai.com>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2023-07-25 13:36:00 +03:00
2488a2ad51 Code cleanup (#4246) 2023-07-22 15:23:00 +00:00
bc699b86e5 Refactor BinaryTreeIsBalanced algorithm (#4222) 2023-06-26 22:26:17 +08:00
415a04ea7f Add automatic linter (#4214) 2023-06-09 20:05:14 +08:00
00282efd8b style: format code (#4212)
close #4204
2023-06-09 18:52:05 +08:00
deef2ae445 Refactor CreateBinaryTreeFromInorderPreorder (#4190) 2023-05-14 14:52:30 +03:00
3a593d5d3c Cover BSTRecursive with tests (#4180) 2023-05-06 21:10:33 +03:00
f69cd7cfa2 Remove redundant code and add tests for BSTIterative (#4164) 2023-04-24 14:52:38 +03:00
4c18e60671 Refactor BSTFromSortedArray (#4162) 2023-04-22 07:53:12 +00:00
c01a382d94 Remove redundant tree traversals (#4161) 2023-04-21 11:41:24 +03:00
1dc388653a Refactor Code Style (#4151) 2023-04-15 11:25:54 +03:00
1ce907625b Fix NullPointer Exception (#4142) 2023-04-15 11:10:39 +03:00
0c618b5ee8 Refactoring (#4146) 2023-04-14 08:34:47 +00:00
8259f0e9cf Add Majority Element (#4131) 2023-04-13 15:28:36 +03:00
ad72c28d91 Remove unnecessary code (#4141) 2023-04-03 22:35:59 +08:00
2418604f7a Add tests for SinglyLinkedList (#3913) 2023-03-12 13:49:17 +02:00
3e9dd776e5 Make LinkedQueue generic (#3909) 2023-03-05 19:08:42 +00: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
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
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
39df47b5f2 Add Kosaraju Algorithm (#3859) 2023-02-08 18:05:52 +00:00
b14f55096d Fix LFUCache (#3847) 2023-01-15 11:28:16 +02: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
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
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
5512fea0a8 Improve priority queues with max-heap (#3648) 2022-12-13 20:02:15 +02:00
eb375a6015 Fix spelling (#3444) 2022-11-07 18:31:44 +00:00
3542f1c4c1 Add check if tree is symmetric or not (fixes #3471) (#3472)
Co-authored-by: Amit Kumar <akumar@indeed.com>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-10-30 10:29:22 +02:00
1e16709680 Update README.md (#3362) 2022-10-23 05:59:40 +00:00
8855cf9525 Optimize Hashmap implementation (#3533) 2022-10-17 14:36:09 +00:00