194 Commits

Author SHA1 Message Date
519f557899 Add tests for CycleSort 2021-10-04 18:53:49 -04:00
0da3880955 Fix bug where cycleSort was not returning the sorted array 2021-10-04 18:53:03 -04:00
b3e6eed3ce Add export to CycleSort for Jest testing 2021-10-04 18:50:14 -04:00
720b7b054b Add function documentation to CycleSort 2021-10-04 18:49:54 -04:00
f4814ba143 Fix typo 2021-10-04 18:49:31 -04:00
7076c2afbf Fix style per standard js rules 2021-10-04 18:44:12 -04:00
7c0379c024 Add tests for CombSort 2021-10-04 18:43:54 -04:00
ea4e816b5e Add export of combSort for Jest testing 2021-10-04 18:42:49 -04:00
4ebe59345b Add function documentation to combSort function 2021-10-04 18:42:28 -04:00
11315ea449 Add tests for BucketSort 2021-10-04 18:36:19 -04:00
1e3648af5a Fix whitespace alignment 2021-10-04 18:35:00 -04:00
877356fbab Fix bug in bucketSort so that a comparison function is now provided to the sort function
The [built-in JavaScript sort method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) will
perform a lexicographical (aka alphabetical) order by converting the elements of the array to strings. This can yield unexpected results when sorting numbers.
A comparison function can be passed into the sort method to indicate how array elements should be compared.
2021-10-04 18:33:35 -04:00
269175689f Add function documentation to bucketSort 2021-10-04 18:27:17 -04:00
754f7b6b04 Export bucketSort function for Jest testing 2021-10-04 17:57:13 -04:00
55080ebffd Add a reference link for BucketSort 2021-10-04 17:56:51 -04:00
0fea99db49 Update FisherYatesShuffle.test.js
Updated fisherYatesShuffle to FisherYatesShuffle
2021-10-03 20:10:56 +05:30
6fdd267459 Update FisherYatesShuffle.js
removed console statement
2021-10-03 20:10:26 +05:30
0ada757576 Update FisherYatesShuffle.js
Splited initialized 'let' declarations into multiple statements
2021-10-03 20:08:02 +05:30
6b2840f579 Added Fisher Yates Algorithm 2021-10-03 15:40:45 +02:00
c198a9f53d Added test for ScrambleStrings and formatted folder structure for other folders 2021-10-03 17:28:17 +05:30
77a2411395 chore: merge add QuickSortRecursive method. (#690)
* add QuickSortRecursive method

* added an exception for test cases

* fix for test cases

* added test cases for QuickSortRecursive
2021-09-19 18:55:25 +05:30
0ad2c6e8f3 Update BubbleSort.js
Corrected spelling mistake
2021-09-04 00:18:49 -07:00
faed847317 Updated the count sort algorithm with stable implementation. Added ES6 syntactic sugar to the syntax. Removed the unwanted len variable and updated the comments 2021-08-08 17:21:05 +05:30
6232f8dd42 Updated the count sort algorithm with stable implementation. Added ES6 syntactic sugar to the syntax 2021-08-08 17:14:41 +05:30
c55ca93584 Updated the count sort algorithm with stable implementation. Added ES6 syntactic sugar to the syntax 2021-08-08 16:42:13 +05:30
376f60ddc6 Added the correct and stable version of count sort. Changed function declaration to ES6 style. 2021-08-06 22:54:48 +05:30
a36fbf988f chore: Fix style problems 2021-06-17 11:07:50 +05:30
37726ff223 Fixed the missing arguments in the function call 2021-05-30 19:08:52 +05:30
3dd10dbe61 Revert "Added Sleep Sort" 2021-05-23 21:09:46 +05:30
8b7b48550a Merge pull request #109 from saurabhbazzad/patch-1
Added Sleep Sort
2021-05-23 15:16:49 +05:30
931f0e54f2 Merge pull request #243 from MustafaSalih1993/master
OddEvenSort Added
2021-05-23 15:05:19 +05:30
51f80fe2b0 fix: Fix MergeSort conflict 2021-05-22 21:02:14 +05:30
c62d169c21 style(IntroSort.js): let to const 2021-05-21 11:57:24 +05:30
8b7c5fdc57 style(InsertionSort.js): Changed var to let (scope taken into account) 2021-05-21 11:52:37 +05:30
ca4c1a62af style: Fixed most styles (according to standardjs) 2021-05-21 11:16:11 +05:30
d43de686c5 Add FindSecondLargestSort (#523)
* Add FindSecondLargestSort

* Add FindSecondLargestSort

* Add FindSecondLargestSort

* Add FindSecondLargestSort

* Add FindSecondLargestSort

* Add FindSecondLargestSort

* Update and rename FindSecondLargestSort.js to FindSecondLargestElement.js

* Update FindSecondLargestElement.js

* Update FindSecondLargestElement.js

Co-authored-by: MacBookPro <macbookpro@MacBookPros-MBP.attlocal.net>
Co-authored-by: vinayak <itssvinayak@gmail.com>
2021-04-03 19:59:58 +05:30
c10cb8c839 Standard fixes | Flash Sort 2021-02-01 21:02:15 +05:30
32cc94ee18 Changed implementation presentation | Flash Sort 2021-02-01 21:01:00 +05:30
72e173c2d4 Improved main description comment | Flash Sort 2021-02-01 20:59:59 +05:30
9decf7bc7f Standard fixes | Cycle Sort 2021-01-25 23:52:47 +05:30
1626a58b35 Improved presentation of Implementation | Cycle Sort 2021-01-25 23:51:55 +05:30
d866534031 Added Wikipedia link | Cycle Sort 2021-01-25 23:51:09 +05:30
9515badb75 Improved main Description comment | Cycle Sort 2021-01-25 23:50:46 +05:30
6c916966d6 Standard formatting fixes | Counting Sort 2021-01-24 23:34:56 +05:30
e0260015cb Improved Implementation presentation | Counting Sort 2021-01-24 23:34:22 +05:30
e6e6648eaf Improved main description comment | Counting Sort 2021-01-24 23:33:15 +05:30
028c16999c Replaced use of var with const | Bogo Sort 2021-01-24 23:31:18 +05:30
b61d6020a1 Replaced use of var with const | Bubble Sort 2021-01-24 23:30:20 +05:30
bf3d37a974 Added animated visual link | Bubble Sort 2021-01-24 23:29:50 +05:30
ddbebe483d Standard Fixes | CombSort 2021-01-23 22:28:41 +05:30