Skip to content

batcoder1/stunning-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status npm

Algorithms with Javascript

Classic algoritms are resolved using javascript

Palindrome

A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam or racecar or the number 10801

Reference: Wikipedia

Greatest Common Divisor (GCD)

In mathematics, the greatest common divisor (gcd) of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For example, the gcd of 8 and 12 is 4.

Reference: Wikipedia

Least Common Multiple (LCM)

In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by LCM(a, b), is the smallest positive integer that is divisible by both a and b.

Reference: Wikipedia

Factorial

The factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example,

5! = 5 x 4 x 3 x 2 x 1 = 120

Reference: Wikipedia

Pythagorean Theorem

Is a fundamental relation in Euclidean geometry among the three sides of a right triangle. It states that the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. The theorem can be written as an equation relating the lengths of the sides a, b and c, often called the "Pythagorean equation":

alt text

Reference: Wikipedia

Reverse String

Get the input string read from right to left

Reverse Integer

Get the input number read from right to left

Maximum subarray problem

The maximum subarray problem is the task of finding a contiguous subarray with the largest sum, within a given one-dimensional array A[1...n] of numbers.

Reference: Wikipedia

Sin

Returns the sine of a number (angle in grades) .

Reference: Wikipedia


Do you want add more algorithms? Let me a PR!!!

Releases

No releases published

Packages

No packages published