diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 478cc824..e81cefe3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,9 +56,9 @@ should add unique value. #### File Naming Convention -- Filenames should use the UpperCamelCase (PascalCase) style. +- Filenames should use the snake_case style. This is needed for our workflows to work correctly. - There should be no spaces in filenames. -- **Example:** `UserProfile.ts` is allowed. Do not use `userprofile.ts`, `Userprofile.ts`, `user-Profile.ts`, `userProfile.ts`; these naming conventions are discouraged. +- **Example:** `user_profile.ts` is allowed. Do not use `userprofile.ts`, `Userprofile.ts`, `user-Profile.ts`, `userProfile.ts`, `UserProfile.ts`; these naming conventions are discouraged. #### Commit Messages Formatting diff --git a/DIRECTORY.md b/DIRECTORY.md index 6e3cb812..53d56eaf 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -24,12 +24,14 @@ * [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) + * [Lowest Common Multiple](https://github.com/TheAlgorithms/TypeScript/blob/master/maths/lowest_common_multiple.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) + * [Linear Search](https://github.com/TheAlgorithms/TypeScript/blob/master/search/linear_search.ts) ## Sorts * [Bubble Sort](https://github.com/TheAlgorithms/TypeScript/blob/master/sorts/bubble_sort.ts) diff --git a/Maths/LowestCommonMultiple.ts b/maths/lowest_common_multiple.ts similarity index 96% rename from Maths/LowestCommonMultiple.ts rename to maths/lowest_common_multiple.ts index fe311b64..c690ae05 100644 --- a/Maths/LowestCommonMultiple.ts +++ b/maths/lowest_common_multiple.ts @@ -9,7 +9,7 @@ * @example LowestCommonMultiple(5, 8, 3) = 120 */ -import { greatestCommonFactor } from "./GreatestCommonFactor"; +import { greatestCommonFactor } from "./greatest_common_factor"; //A naive solution which requires no additional mathematical algorithm diff --git a/Maths/test/LowestCommonMultiple.test.ts b/maths/test/lowest_common_multiple.test.ts similarity index 94% rename from Maths/test/LowestCommonMultiple.test.ts rename to maths/test/lowest_common_multiple.test.ts index 00dac6d3..55ea9a24 100644 --- a/Maths/test/LowestCommonMultiple.test.ts +++ b/maths/test/lowest_common_multiple.test.ts @@ -1,4 +1,4 @@ -import { binaryLCM, lowestCommonMultiple, naiveLCM } from "../LowestCommonMultiple"; +import { binaryLCM, lowestCommonMultiple, naiveLCM } from "../lowest_common_multiple"; describe("naiveLCM", () => { test.each([[[3, 4], 12], [[8, 6], 24], [[5, 8, 3], 120], [[0.8, 0.4], 0.8]])( diff --git a/Search/LinearSearch.ts b/search/linear_search.ts similarity index 100% rename from Search/LinearSearch.ts rename to search/linear_search.ts diff --git a/Search/test/LinearSearch.test.ts b/search/test/linear_search.test.ts similarity index 87% rename from Search/test/LinearSearch.test.ts rename to search/test/linear_search.test.ts index 71021022..b0ab6605 100644 --- a/Search/test/LinearSearch.test.ts +++ b/search/test/linear_search.test.ts @@ -1,4 +1,4 @@ -import { linearSearch } from "../LinearSearch"; +import { linearSearch } from "../linear_search"; describe("Linear search", () => { test.each([