30 Commits

Author SHA1 Message Date
5a7e8d1325 implemented CycleDetectionII code in LinkedList (#1482)
* implemented CycleTectionII code

* changes made per review by appgurueu

* made the changes per review by appgurueu

* changes made per review by appgurueu

* did some changes

* fixed the test file with prettier

* Simplify code, renames for clarity

---------

Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-01-04 18:19:13 +05:30
ca761d87b6 feat: add MergeTwoSortedLinkedLIsts algorithms (#1442)
* feat: add mergeTwoSortedLinkedLIsts algorithms

* remove class and unnecessary function

change the function params and return value from Node to LinkedList.
2023-10-11 06:05:09 +00:00
86d333ee94 feat: Test running overhaul, switch to Prettier & reformat everything (#1407)
* chore: Switch to Node 20 + Vitest

* chore: migrate to vitest mock functions

* chore: code style (switch to prettier)

* test: re-enable long-running test

Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime!

see #1193

* chore: code style

* chore: fix failing tests

* Updated Documentation in README.md

* Update contribution guidelines to state usage of Prettier

* fix: set prettier printWidth back to 80

* chore: apply updated code style automatically

* fix: set prettier line endings to lf again

* chore: apply updated code style automatically

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2023-10-04 02:38:19 +05:30
1666c3a0be fix error in SinglyLinkedList head method (#1322)
* fix error in SinglyLinkedList head method

* test: update check head test for SinglyLinkedList

* fix: code style error

* fix: remove extra semicolons

---------

Co-authored-by: Bekzod <bekzodisakov18@gmail.com>
2023-05-15 13:35:09 +05:30
c40e4cf4d4 Refactored code to improve performance of some methods (#1284)
* refactored code to improve perfomance

* added 'check tail' test

* corrected styling and spelling mistake
2023-02-08 18:16:57 +05:30
c5101e3e2b chore: add reverse to singly linked list (#1241)
* Fix: Reverse Singly Linked List

* Added reverse in SinglyLinkedList

* Added reverse in SinglyLinkedList

* Changes made
2022-10-30 14:46:56 +05:30
9bcf16ba4b refactor: RotateListRight.js and added tests (#1101)
* Refactored RotatedListRight.js and added its tests

* rotateListRight test and improved implementation

* Review changes on constructor's loop
2022-09-22 17:22:11 +05:30
cf0593f430 Refactor Cycledetection.js and added it's test. (#1099) 2022-09-15 12:22:44 +05:30
6ad2467545 algorithm: find the middle of linked-list (#1096)
* Added Middle of linked-list implementation.

* Added Middle of LL function and tests

* Refactor: Added method in singly LL and its tests

* Refactor: Method name and inline test calls

* Use `!== null` instead of `!= null`

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2022-09-10 19:17:50 +05:30
15c20968ae merge: Add test case to jump search Algorithm (#1041)
* Add test case to jump search Algorithm

* Updated Documentation in README.md

* Remove commented code

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-06-10 20:32:47 +05:30
74857b7a9e merge: Improvement on singly circular linkedList (#981)
* Auto-update DIRECTORY.md

* Update and rename SingleCircularLinkedList.js.js to SinglyCircularLinkedList.js

* Test Case creation for SinglyCircularLinkedList

* Update SinglyCircularLinkedList.js

* Update SinglyCircularLinkedList.test.js

* Update SinglyCircularLinkedList.js

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-10 15:36:48 +05:30
dfe200a957 merge: Improving coding standard of singly linked list (#980)
* Auto-update DIRECTORY.md

* Changes on SinglyLinkedList

* Spelling change

* Added comment for initiateNodeAndIndex()

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-04-09 12:26:22 +05:30
be15d08b4a merge: replaced constructor function with es6 class syntax (#900)
* replaced constructor function with es6 class syntax

* formatted code with standard.js
2022-02-23 16:16:45 +05:30
29a3ab73bc merge: Iterator and log methods added for linked lists (#891)
* iterator, log methods added in SL

* iterator, log methods added in DL

* test file added for DoublyLL

* format issue fix
2022-02-18 20:13:45 +05:30
9911410e70 merge: Implement Add Two Numbers (Linked List) (#888)
* Implement Add Two Numbers (Linked List)

* Implement Add Two Numbers (Linked List)

* Implement Add Two Numbers (Linked List)

Co-authored-by: Shakil Ahmmed <shakilahmmed@ShakilAhmmeds-MacBook-Pro.local>
2022-02-17 17:29:36 +05:30
c496925d25 merge: rename SinglyLinkList to SinglyLinkedList (#881) 2022-02-14 13:49:10 +05:30
961f21f97c merge: Add test case and enacements (#858) 2021-12-01 11:38:06 +05:30
e83b570d44 merge: fixed some spellings (#773)
* fixed some spellings

* Update Data-Structures/Linked-List/SinglyLinkList.js

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>

Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-10-22 13:26:26 +05:30
e18718b7d5 Remove live code & console.log, leave examples as comments. 2021-10-11 14:07:10 +02:00
a3d44ad3e1 Data Structure : remove live code & console.log 2021-10-10 16:11:06 +02:00
1589263947 fixed some spellings 2021-10-05 12:49:23 +05:30
ca4c1a62af style: Fixed most styles (according to standardjs) 2021-05-21 11:16:11 +05:30
c6b95c29e2 Merge pull request #426 from pomkarnath98/rotate-list-right
Added Rotate List Right by k places to the list
2020-10-10 13:02:44 +05:30
35cade3908 Changed Styles as per guidelines 2020-10-06 15:14:39 +05:30
da21e7d326 Added Rotate List Right by k places to the list 2020-10-06 15:09:33 +05:30
b6710baccc add new data structures (Single Circular Linked List) (#400)
* add new data structures (Single Circular Linked List)

* fix standard

* fix standard js

* fix code standard
2020-10-06 12:19:50 +05:30
3ab272da4b Style Changed 2020-10-05 00:00:45 +05:30
e31390f0a0 Added Dummy head to avoid Undefined Error 2020-10-04 23:55:40 +05:30
48c7bab832 Added Cycle Detection Problem in Linkedlist 2020-10-04 23:44:17 +05:30
7ff6b8716f editing file names 2020-05-06 21:07:49 +05:30