TypeScript
TypeScript copied to clipboard
Algorithms and Data Structures implemented in TypeScript for beginners, following best practices.
Implemented the functions to raise to calculate the result of the power of another number using binary exponentiation that are mentioned in issue #10
I have implemented the cocktail sort/cocktail shaker sorting algorithm.
#### Summary of the Change: This pull request introduces the Euclidean distance algorithm, a method to calculate the distance between two vectors in a multi-dimensional space #### Motivation: I wanted...
This PR adds the **Bisection Method** to the `maths` module. ### Changes: - Added `bisection` function to solve equations of the form `f(x) = 0`. - Created tests for the...
I wrote two functions for the famous Goldbach's [conjecture](https://en.wikipedia.org/wiki/Goldbach%27s_conjecture), which basically says that for every natural number greater than 2, it can be rewritten as the sum of two primes....
### Motivation I have been looking at the code for checking whether an array is sorted and this is the current implementation: ```TypeScript export function isSortedArray(arr: number[]): boolean { for...
Added the implementation for bijection method binary to decimal and Euler method
Implemented the functions to isolate the decimal part of a number that are mentioned in the issue #10