diff --git a/.github/workflows/directory_formatter.yml b/.github/workflows/directory_formatter.yml new file mode 100644 index 00000000..3a9eae0b --- /dev/null +++ b/.github/workflows/directory_formatter.yml @@ -0,0 +1,41 @@ +name: Directory/Filename Formatter workflow +on: [push, pull_request] + +jobs: + main: + name: (Directory) Formatter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: Setup Git configuration + run: | + git config --global user.name 'autoprettier' + git config --global user.email 'actions@github.com' + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY + - name: Filename Formatter + run: | + IFS=$'\n' + for fname in `find . -type f -name '*.ts' -o -name '*.ts'` + do + echo "${fname}" + new_fname=`echo ${fname} | tr ' ' '_'` + echo " ${new_fname}" + new_fname=`echo ${new_fname} | tr 'A-Z' 'a-z'` + echo " ${new_fname}" + new_fname=`echo ${new_fname} | tr '-' '_'` + echo " ${new_fname}" + if [ ${fname} != ${new_fname} ] + then + echo " ${fname} --> ${new_fname}" + git "mv" "${fname}" ${new_fname} + fi + done + git commit -am "Formatting filenames ${GITHUB_SHA::8}" || true + - name: Update DIRECTORY.md + run: | + wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/build_directory_md.py + python3 build_directory_md.py TypeScript . .ts jest.config.ts,sorts/test,search/test,maths/test,dynamic_programming/test,data_structures/test,ciphers/test > DIRECTORY.md + + git diff + git commit -m "Update DIRECTORY.md" DIRECTORY.md || true + git push --force origin HEAD:$GITHUB_REF || true diff --git a/DIRECTORY.md b/DIRECTORY.md new file mode 100644 index 00000000..6e3cb812 --- /dev/null +++ b/DIRECTORY.md @@ -0,0 +1,39 @@ + +## Ciphers + * [Xor Cipher](https://github.com/TheAlgorithms/TypeScript/blob/master/ciphers/xor_cipher.ts) + +## Data Structures + * [Stack](https://github.com/TheAlgorithms/TypeScript/blob/master/data_structures/stack.ts) + +## Dynamic Programming + * [Knapsack](https://github.com/TheAlgorithms/TypeScript/blob/master/dynamic_programming/knapsack.ts) + +## Maths + * [Absolute Value](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/absolute_value.ts) + * [Aliquot Sum](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/aliquot_sum.ts) + * [Armstrong Number](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/armstrong_number.ts) + * [Binary Convert](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/binary_convert.ts) + * [Calculate Mean](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/calculate_mean.ts) + * [Degrees To Radians](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/degrees_to_radians.ts) + * [Digit Sum](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/digit_sum.ts) + * [Factorial](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/factorial.ts) + * [Fibonacci](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/fibonacci.ts) + * [Find Min](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/find_min.ts) + * [Greatest Common Factor](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/greatest_common_factor.ts) + * [Is Divisible](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_divisible.ts) + * [Is Even](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_even.ts) + * [Is Leap Year](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_leap_year.ts) + * [Is Odd](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/is_odd.ts) + * [Perfect Square](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/perfect_square.ts) + * [Radians To Degrees](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/radians_to_degrees.ts) + * [Sieve Of Eratosthenes](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/sieve_of_eratosthenes.ts) + +## Search + * [Binary Search](https://github.com/TheAlgorithms/TypeScript/blob/master/search/binary_search.ts) + +## Sorts + * [Bubble Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/bubble_sort.ts) + * [Gnome Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/gnome_sort.ts) + * [Insertion Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/insertion_sort.ts) + * [Merge Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/merge_sort.ts) + * [Quick Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/quick_sort.ts) diff --git a/Ciphers/test/XORCipher.test.ts b/ciphers/test/xor_cipher.test.ts similarity index 83% rename from Ciphers/test/XORCipher.test.ts rename to ciphers/test/xor_cipher.test.ts index 5eb14c65..b8def4a6 100644 --- a/Ciphers/test/XORCipher.test.ts +++ b/ciphers/test/xor_cipher.test.ts @@ -1,4 +1,4 @@ -import { XORCipher } from '../XORCipher'; +import { XORCipher } from '../xor_cipher'; describe('Testing XORCipher function', () => { it('passing a string & number as an argument', () => { diff --git a/Ciphers/XORCipher.ts b/ciphers/xor_cipher.ts similarity index 100% rename from Ciphers/XORCipher.ts rename to ciphers/xor_cipher.ts diff --git a/Data-Structures/Stack.ts b/data_structures/stack.ts similarity index 100% rename from Data-Structures/Stack.ts rename to data_structures/stack.ts diff --git a/Data-Structures/test/Stack.test.ts b/data_structures/test/stack.test.ts similarity index 97% rename from Data-Structures/test/Stack.test.ts rename to data_structures/test/stack.test.ts index 7cdaab4c..514ba4b7 100644 --- a/Data-Structures/test/Stack.test.ts +++ b/data_structures/test/stack.test.ts @@ -1,4 +1,4 @@ -import { Stack } from '../Stack'; +import { Stack } from '../stack'; describe('Testing Stack data structure', () => { it('push should add a new element to the stack', () => { diff --git a/dynamic_programing/Knapsack.ts b/dynamic_programming/knapsack.ts similarity index 100% rename from dynamic_programing/Knapsack.ts rename to dynamic_programming/knapsack.ts diff --git a/dynamic_programing/test/Knapsack.test.ts b/dynamic_programming/test/knapsack.test.ts similarity index 94% rename from dynamic_programing/test/Knapsack.test.ts rename to dynamic_programming/test/knapsack.test.ts index a9092558..c2767712 100644 --- a/dynamic_programing/test/Knapsack.test.ts +++ b/dynamic_programming/test/knapsack.test.ts @@ -1,4 +1,4 @@ -import { knapsack } from "../Knapsack"; +import { knapsack } from "../knapsack"; const cases: [number, number[], number[], number][] = [ [15, [6, 5, 6, 6, 3, 7], [5, 6, 4, 6, 5, 2], 17], diff --git a/Maths/AbsoluteValue.ts b/maths/absolute_value.ts similarity index 100% rename from Maths/AbsoluteValue.ts rename to maths/absolute_value.ts diff --git a/Maths/AliquotSum.ts b/maths/aliquot_sum.ts similarity index 100% rename from Maths/AliquotSum.ts rename to maths/aliquot_sum.ts diff --git a/Maths/ArmstrongNumber.ts b/maths/armstrong_number.ts similarity index 100% rename from Maths/ArmstrongNumber.ts rename to maths/armstrong_number.ts diff --git a/Maths/BinaryConvert.ts b/maths/binary_convert.ts similarity index 100% rename from Maths/BinaryConvert.ts rename to maths/binary_convert.ts diff --git a/Maths/CalculateMean.ts b/maths/calculate_mean.ts similarity index 100% rename from Maths/CalculateMean.ts rename to maths/calculate_mean.ts diff --git a/Maths/DegreesToRadians.ts b/maths/degrees_to_radians.ts similarity index 100% rename from Maths/DegreesToRadians.ts rename to maths/degrees_to_radians.ts diff --git a/Maths/DigitSum.ts b/maths/digit_sum.ts similarity index 100% rename from Maths/DigitSum.ts rename to maths/digit_sum.ts diff --git a/Maths/Factorial.ts b/maths/factorial.ts similarity index 100% rename from Maths/Factorial.ts rename to maths/factorial.ts diff --git a/Maths/Fibonacci.ts b/maths/fibonacci.ts similarity index 100% rename from Maths/Fibonacci.ts rename to maths/fibonacci.ts diff --git a/Maths/FindMin.ts b/maths/find_min.ts similarity index 100% rename from Maths/FindMin.ts rename to maths/find_min.ts diff --git a/Maths/GreatestCommonFactor.ts b/maths/greatest_common_factor.ts similarity index 100% rename from Maths/GreatestCommonFactor.ts rename to maths/greatest_common_factor.ts diff --git a/Maths/IsDivisible.ts b/maths/is_divisible.ts similarity index 100% rename from Maths/IsDivisible.ts rename to maths/is_divisible.ts diff --git a/Maths/IsEven.ts b/maths/is_even.ts similarity index 100% rename from Maths/IsEven.ts rename to maths/is_even.ts diff --git a/Maths/IsLeapYear.ts b/maths/is_leap_year.ts similarity index 100% rename from Maths/IsLeapYear.ts rename to maths/is_leap_year.ts diff --git a/Maths/IsOdd.ts b/maths/is_odd.ts similarity index 100% rename from Maths/IsOdd.ts rename to maths/is_odd.ts diff --git a/Maths/PerfectSquare.ts b/maths/perfect_square.ts similarity index 100% rename from Maths/PerfectSquare.ts rename to maths/perfect_square.ts diff --git a/Maths/RadiansToDegrees.ts b/maths/radians_to_degrees.ts similarity index 100% rename from Maths/RadiansToDegrees.ts rename to maths/radians_to_degrees.ts diff --git a/Maths/SieveOfEratosthenes.ts b/maths/sieve_of_eratosthenes.ts similarity index 100% rename from Maths/SieveOfEratosthenes.ts rename to maths/sieve_of_eratosthenes.ts diff --git a/Maths/test/AbsoluteValue.test.ts b/maths/test/absolute_value.test.ts similarity index 95% rename from Maths/test/AbsoluteValue.test.ts rename to maths/test/absolute_value.test.ts index 7626382d..6ed93099 100644 --- a/Maths/test/AbsoluteValue.test.ts +++ b/maths/test/absolute_value.test.ts @@ -1,4 +1,4 @@ -import { AbsoluteValue } from "../AbsoluteValue"; +import { AbsoluteValue } from "../absolute_value"; describe("AbsoluteValue", () => { it("should return the absolute value of zero", () => { diff --git a/Maths/test/AliquotSum.test.ts b/maths/test/aliquot_sum.test.ts similarity index 80% rename from Maths/test/AliquotSum.test.ts rename to maths/test/aliquot_sum.test.ts index d1d7234d..48838589 100644 --- a/Maths/test/AliquotSum.test.ts +++ b/maths/test/aliquot_sum.test.ts @@ -1,4 +1,4 @@ -import { AliquotSum } from "../AliquotSum"; +import { AliquotSum } from "../aliquot_sum"; test.each([[15, 9], [18, 21], [28, 28], [100, 117], [169, 14], [1729, 511], [15625, 3906]])("Aliquot Sum of %i is %i", (num, expected) => { expect(AliquotSum(num)).toBe(expected) diff --git a/Maths/test/ArmstrongNumber.test.ts b/maths/test/armstrong_number.test.ts similarity index 79% rename from Maths/test/ArmstrongNumber.test.ts rename to maths/test/armstrong_number.test.ts index 5ff38656..fab10e58 100644 --- a/Maths/test/ArmstrongNumber.test.ts +++ b/maths/test/armstrong_number.test.ts @@ -1,4 +1,4 @@ -import { ArmstrongNumber } from "../ArmstrongNumber" +import { ArmstrongNumber } from "../armstrong_number" test.each([[9, true], [-310, false], [0, false], [407, true], [420, false], [92727, true], [13579, false]])('i is an Armstrong number or not', (num, expected) => { expect(ArmstrongNumber(num)).toBe(expected) diff --git a/Maths/test/BinaryConvert.test.ts b/maths/test/binary_convert.test.ts similarity index 93% rename from Maths/test/BinaryConvert.test.ts rename to maths/test/binary_convert.test.ts index 686e5c14..73051a02 100644 --- a/Maths/test/BinaryConvert.test.ts +++ b/maths/test/binary_convert.test.ts @@ -1,4 +1,4 @@ -import { BinaryConvert } from '../BinaryConvert' +import { BinaryConvert } from '../binary_convert' describe('BinaryConvert', () => { it('should return the correct value', () => { diff --git a/Maths/test/CalculateMean.test.ts b/maths/test/calculate_mean.test.ts similarity index 94% rename from Maths/test/CalculateMean.test.ts rename to maths/test/calculate_mean.test.ts index bb874b22..36d7963e 100644 --- a/Maths/test/CalculateMean.test.ts +++ b/maths/test/calculate_mean.test.ts @@ -1,4 +1,4 @@ -import { calculateMean } from "../CalculateMean"; +import { calculateMean } from "../calculate_mean"; describe("Tests for AverageMean", () => { it("should be a function", () => { diff --git a/Maths/test/DegreesToRadians.test.ts b/maths/test/degrees_to_radians.test.ts similarity index 76% rename from Maths/test/DegreesToRadians.test.ts rename to maths/test/degrees_to_radians.test.ts index 0633d695..ac472b69 100644 --- a/Maths/test/DegreesToRadians.test.ts +++ b/maths/test/degrees_to_radians.test.ts @@ -1,4 +1,4 @@ -import {degreesToRadians} from '../DegreesToRadians'; +import {degreesToRadians} from '../degrees_to_radians'; test("DegreesToRadians", () => { expect(degreesToRadians(0)).toBe(0); diff --git a/Maths/test/DigitSum.test.ts b/maths/test/digit_sum.test.ts similarity index 92% rename from Maths/test/DigitSum.test.ts rename to maths/test/digit_sum.test.ts index 5db9f994..5430f90b 100644 --- a/Maths/test/DigitSum.test.ts +++ b/maths/test/digit_sum.test.ts @@ -1,4 +1,4 @@ -import { DigitSum } from "../DigitSum"; +import { DigitSum } from "../digit_sum"; describe("DigitSum", () => { test.each([-42, -0.1, -1, 0.2, 3.3, NaN, -Infinity, Infinity])( diff --git a/Maths/test/Factorial.test.ts b/maths/test/factorial.test.ts similarity index 92% rename from Maths/test/Factorial.test.ts rename to maths/test/factorial.test.ts index 5ce5ccba..ecd26258 100644 --- a/Maths/test/Factorial.test.ts +++ b/maths/test/factorial.test.ts @@ -1,4 +1,4 @@ -import { Factorial } from "../Factorial"; +import { Factorial } from "../factorial"; describe("Factorial", () => { test.each([-0.1, -1, -2, -42, 0.01, 0.42, 0.5, 1.337])( diff --git a/Maths/test/Fibonacci.test.ts b/maths/test/fibonacci.test.ts similarity index 86% rename from Maths/test/Fibonacci.test.ts rename to maths/test/fibonacci.test.ts index 0a379ed7..578d7b79 100644 --- a/Maths/test/Fibonacci.test.ts +++ b/maths/test/fibonacci.test.ts @@ -1,4 +1,4 @@ -import {nthFibonacci} from '../Fibonacci'; +import {nthFibonacci} from '../fibonacci'; describe('nthFibonacci', () => { test('should return correct value', () => { diff --git a/Maths/test/FindMin.test.ts b/maths/test/find_min.test.ts similarity index 91% rename from Maths/test/FindMin.test.ts rename to maths/test/find_min.test.ts index 8049e954..ec19c841 100644 --- a/Maths/test/FindMin.test.ts +++ b/maths/test/find_min.test.ts @@ -1,4 +1,4 @@ -import { FindMin } from "../FindMin"; +import { FindMin } from "../find_min"; describe("FindMin", () => { test.each([[[1,2,3,4,5,6], 1], [[87,6,13,999], 6], [[0.8,0.2,0.3,0.5], 0.2], [[1,0.1,-1], -1]])( diff --git a/Maths/test/GreatestCommonFactor.test.ts b/maths/test/greatest_common_factor.test.ts similarity index 93% rename from Maths/test/GreatestCommonFactor.test.ts rename to maths/test/greatest_common_factor.test.ts index f5bd6852..4d219fde 100644 --- a/Maths/test/GreatestCommonFactor.test.ts +++ b/maths/test/greatest_common_factor.test.ts @@ -1,4 +1,4 @@ -import { binaryGCF, greatestCommonFactor } from "../GreatestCommonFactor"; +import { binaryGCF, greatestCommonFactor } from "../greatest_common_factor"; describe("binaryGCF", () => { test.each([[12, 8, 4], [1, 199, 1], [88, 40, 8], [288, 160, 32]])( diff --git a/Maths/test/IsDivisible.test.ts b/maths/test/is_divisible.test.ts similarity index 94% rename from Maths/test/IsDivisible.test.ts rename to maths/test/is_divisible.test.ts index f671f980..93330674 100644 --- a/Maths/test/IsDivisible.test.ts +++ b/maths/test/is_divisible.test.ts @@ -1,4 +1,4 @@ -import { IsDivisible } from "../IsDivisible"; +import { IsDivisible } from "../is_divisible"; describe("IsDivisible", () => { test.each([ diff --git a/Maths/test/IsEven.test.ts b/maths/test/is_even.test.ts similarity index 91% rename from Maths/test/IsEven.test.ts rename to maths/test/is_even.test.ts index 283c4f38..d07aef02 100644 --- a/Maths/test/IsEven.test.ts +++ b/maths/test/is_even.test.ts @@ -1,4 +1,4 @@ -import { IsEven } from "../IsEven"; +import { IsEven } from "../is_even"; describe("IsEven", () => { test.each([[2, true], [1, false], [0, true], [-1, false], [-2, true]])( diff --git a/Maths/test/IsLeapYear.test.ts b/maths/test/is_leap_year.test.ts similarity index 97% rename from Maths/test/IsLeapYear.test.ts rename to maths/test/is_leap_year.test.ts index 79acb8bd..184f366d 100644 --- a/Maths/test/IsLeapYear.test.ts +++ b/maths/test/is_leap_year.test.ts @@ -1,4 +1,4 @@ -import { IsLeapYear } from "../IsLeapYear"; +import { IsLeapYear } from "../is_leap_year"; describe("IsLeapYear", () => { test.each([4, 8, 12, 2004])( diff --git a/Maths/test/IsOdd.test.ts b/maths/test/is_odd.test.ts similarity index 91% rename from Maths/test/IsOdd.test.ts rename to maths/test/is_odd.test.ts index 91fd6925..d4c105d1 100644 --- a/Maths/test/IsOdd.test.ts +++ b/maths/test/is_odd.test.ts @@ -1,4 +1,4 @@ -import { IsOdd } from "../IsOdd"; +import { IsOdd } from "../is_odd"; describe("IsOdd", () => { test.each([[2, false], [1, true], [0, false], [-1, true], [-2, false]])( diff --git a/Maths/test/PerfectSquare.test.ts b/maths/test/perfect_square.test.ts similarity index 83% rename from Maths/test/PerfectSquare.test.ts rename to maths/test/perfect_square.test.ts index b11ddedd..28020020 100644 --- a/Maths/test/PerfectSquare.test.ts +++ b/maths/test/perfect_square.test.ts @@ -1,4 +1,4 @@ -import { PerfectSquare } from "../PerfectSquare"; +import { PerfectSquare } from "../perfect_square"; test("Check perfect square", () => { expect(PerfectSquare(16)).toBe(true); diff --git a/Maths/test/RadiansToDegrees.test.ts b/maths/test/radians_to_degrees.test.ts similarity index 76% rename from Maths/test/RadiansToDegrees.test.ts rename to maths/test/radians_to_degrees.test.ts index 563f6dd6..9f61994f 100644 --- a/Maths/test/RadiansToDegrees.test.ts +++ b/maths/test/radians_to_degrees.test.ts @@ -1,4 +1,4 @@ -import {radiansToDegrees} from '../RadiansToDegrees'; +import {radiansToDegrees} from '../radians_to_degrees'; test("RadiansToDegrees", () => { expect(radiansToDegrees(0)).toBe(0); diff --git a/Maths/test/SieveOfEratosthenes.test.ts b/maths/test/sieve_of_eratosthenes.test.ts similarity index 88% rename from Maths/test/SieveOfEratosthenes.test.ts rename to maths/test/sieve_of_eratosthenes.test.ts index f835240f..3e7fd866 100644 --- a/Maths/test/SieveOfEratosthenes.test.ts +++ b/maths/test/sieve_of_eratosthenes.test.ts @@ -1,4 +1,4 @@ -import { SieveOfEratosthenes } from "../SieveOfEratosthenes"; +import { SieveOfEratosthenes } from "../sieve_of_eratosthenes"; describe("Sieve of Eratosthenes", () => { diff --git a/Search/BinarySearch.ts b/search/binary_search.ts similarity index 100% rename from Search/BinarySearch.ts rename to search/binary_search.ts diff --git a/Search/test/BinarySearch.test.ts b/search/test/binary_search.test.ts similarity index 98% rename from Search/test/BinarySearch.test.ts rename to search/test/binary_search.test.ts index 89f0b05c..0e218a13 100644 --- a/Search/test/BinarySearch.test.ts +++ b/search/test/binary_search.test.ts @@ -1,4 +1,4 @@ -import { binarySearchIterative, binarySearchRecursive } from "../BinarySearch"; +import { binarySearchIterative, binarySearchRecursive } from "../binary_search"; describe("BinarySearch", () => { const testArray: number[] = [1,2,3,4]; diff --git a/Sorts/BubbleSort.ts b/sorts/bubble_sort.ts similarity index 100% rename from Sorts/BubbleSort.ts rename to sorts/bubble_sort.ts diff --git a/Sorts/GnomeSort.ts b/sorts/gnome_sort.ts similarity index 100% rename from Sorts/GnomeSort.ts rename to sorts/gnome_sort.ts diff --git a/Sorts/InsertionSort.ts b/sorts/insertion_sort.ts similarity index 100% rename from Sorts/InsertionSort.ts rename to sorts/insertion_sort.ts diff --git a/Sorts/MergeSort.ts b/sorts/merge_sort.ts similarity index 100% rename from Sorts/MergeSort.ts rename to sorts/merge_sort.ts diff --git a/Sorts/QuickSort.ts b/sorts/quick_sort.ts similarity index 100% rename from Sorts/QuickSort.ts rename to sorts/quick_sort.ts diff --git a/Sorts/test/BubbleSort.test.ts b/sorts/test/bubble_sort.test.ts similarity index 93% rename from Sorts/test/BubbleSort.test.ts rename to sorts/test/bubble_sort.test.ts index 6516dd50..29e11f94 100644 --- a/Sorts/test/BubbleSort.test.ts +++ b/sorts/test/bubble_sort.test.ts @@ -1,4 +1,4 @@ -import {bubbleSort} from "../BubbleSort" +import {bubbleSort} from "../bubble_sort" describe("BubbleSort", () => {  it("should return the correct value for average case", () => { diff --git a/Sorts/test/GnomeSort.test.ts b/sorts/test/gnome_sort.test.ts similarity index 91% rename from Sorts/test/GnomeSort.test.ts rename to sorts/test/gnome_sort.test.ts index 7d9ad65d..d5a6ac1c 100644 --- a/Sorts/test/GnomeSort.test.ts +++ b/sorts/test/gnome_sort.test.ts @@ -1,4 +1,4 @@ -import { gnomeSort } from '../GnomeSort'; +import { gnomeSort } from '../gnome_sort'; describe('Testing Gnome sort', () => { const testCases: number[][] = [ diff --git a/Sorts/test/InsertionSort.test.ts b/sorts/test/insertion_sort.test.ts similarity index 90% rename from Sorts/test/InsertionSort.test.ts rename to sorts/test/insertion_sort.test.ts index 16aeb38f..e90c9e41 100644 --- a/Sorts/test/InsertionSort.test.ts +++ b/sorts/test/insertion_sort.test.ts @@ -1,4 +1,4 @@ -import { insertionSort } from "../InsertionSort"; +import { insertionSort } from "../insertion_sort"; describe("Insertion Sort", () => { it("should return the correct value for average case", () => { diff --git a/Sorts/test/MergeSort.test.ts b/sorts/test/merge_sort.test.ts similarity index 92% rename from Sorts/test/MergeSort.test.ts rename to sorts/test/merge_sort.test.ts index 52665329..8b85c712 100644 --- a/Sorts/test/MergeSort.test.ts +++ b/sorts/test/merge_sort.test.ts @@ -1,4 +1,4 @@ -import { MergeSort } from "../MergeSort"; +import { MergeSort } from "../merge_sort"; describe("Merge Sort", () => { it("generating array with variable length and comparing with sorted array", () => { diff --git a/Sorts/test/QuickSort.test.ts b/sorts/test/quick_sort.test.ts similarity index 93% rename from Sorts/test/QuickSort.test.ts rename to sorts/test/quick_sort.test.ts index fbbbb67d..aa4e1167 100644 --- a/Sorts/test/QuickSort.test.ts +++ b/sorts/test/quick_sort.test.ts @@ -1,4 +1,4 @@ -import { QuickSort } from "../QuickSort"; +import { QuickSort } from "../quick_sort"; describe("Quick Sort", () => { it("should return the correct value for average case", () => {