Skip to content

Commit 869135a

Browse files
authored
style: use T[] instead of Array<T> (#243)
1 parent d42b962 commit 869135a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sorts/shell_sort.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* Average case - O(n log(n)^2)
1010
*
1111
* @param {T[]} arr - The input array
12-
* @return {Array<T>} - The sorted array.
12+
* @return {T[]} - The sorted array.
1313
* @see [Shell Sort] (https://www.geeksforgeeks.org/shellsort/)
1414
* @example shellSort([4, 1, 8, 10, 3, 2, 5, 0, 7, 6, 9]) = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
1515
*/
16-
export function shellSort<T>(arr: T[]): Array<T> {
16+
export function shellSort<T>(arr: T[]): T[] {
1717
// start with the biggest gap, reduce gap twice on each step
1818
for (let gap = arr.length >> 1; gap > 0; gap >>= 1) {
1919
for (let i = gap; i < arr.length; i++) {

0 commit comments

Comments
 (0)