Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7560357

Browse files
fixing or applying suggested changes
1 parent 18edde7 commit 7560357

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

‎Sorts/BeadSort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* NOTE: It only works for arrays of positive integers.
88
*
99
* Wikipedia: https://en.wikipedia.org/wiki/Bead_sort
10-
* @param {number[]} sequence An array of positive integers to be sorted using Bead Sort.
11-
* @returns {number[]} Returns a sorted array of positive integers using Bead Sort.
10+
* @param {number[]} sequence An array of positive integers to be sorted.
11+
* @returns {number[]} Returns a sorted array of positive integers.
1212
* @throws {RangeError} Throws a RangeError if the input sequence contains any negative integers.
1313
*/
1414
export function beadSort(sequence) {

‎Sorts/BogoSort.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Checks whether the given array is sorted in ascending order.
3-
* @param {number[]} array The array to be checked for sorted order.
3+
* @param {String[]}
44
* @returns {boolean} Returns true if the array is sorted in ascending order, false otherwise.
55
*/
66
export function isSorted(array) {
@@ -15,7 +15,7 @@ export function isSorted(array) {
1515

1616
/**
1717
* Shuffles the given array randomly in place.
18-
* @param {any[]} array The array to be shuffled.
18+
* @param {any[]}
1919
*/
2020
function shuffle(array) {
2121
for (let i = array.length - 1; i; i--) {

‎Sorts/BubbleSort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function bubbleSort(items) {
4444

4545
/**
4646
* Using a while loop and a for loop.
47-
* @param {number[]} arr The array to be sorted.
47+
* @param {number[]}
4848
* @returns {number[]} The sorted array.
4949
*/
5050
export function alternativeBubbleSort(arr) {

‎Sorts/CocktailShakerSort.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Wikipedia (Cocktail Shaker Sort): https://en.wikipedia.org/wiki/Cocktail_shaker_sort
99
* Wikipedia (Bubble Sort): https://en.wikipedia.org/wiki/Bubble_sort
1010
*
11-
* @param {number[]} items The array of numbers to be sorted.
11+
* @param {number[]}
1212
* @returns {number[]} The sorted array.
1313
*/
1414
export function cocktailShakerSort(items) {

‎Sorts/FisherYatesShuffle.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/**
2-
* Shuffles the elements of the given array randomly in place.
3-
* @param {Array} array The array to be shuffled.
42
* @returns {Array} The shuffled array.
53
*/
64
export const shuffle = (array) => {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /