## [Golang] Distinct powers - Problem 29 - Project Euler

Go solution to Distinct powers - Problem 29 - Project Euler.

## [Golang] Number spiral diagonals - Problem 28 - Project Euler

Go solution to Number spiral diagonals - Problem 28 - Project Euler.

## [Golang] Names scores - Problem 22 - Project Euler

Go solution to Names scores - Problem 22 - Project Euler.

## [Golang] Counting Sundays - Problem 19 - Project Euler

Go solution to Counting Sundays - Problem 19 - Project Euler.

## [Golang] Pandigital products - Problem 32 - Project Euler

Go solution to Pandigital products - Problem 32 - Project Euler.

## [Golang] Coin sums - Problem 31 - Project Euler

Go solution to Coin sums - Problem 31 - Project Euler.

## [Golang] Naive Method for Primality Test

Naive method for primality test in Go: Given a natural number n, if n is divisible by any number from 2 to square root of n, then n is composite. Otherwise n is prime.

## Online Calcualte Politeness of Number

Calculate politeness of a number online, i.e., the number of ways it can be expressed as the sum of consecutive integers.

## Calcualte Politeness of Number in Golang

Calculate politeness of a number in Go, i.e., the number of ways it can be expressed as the sum of consecutive integers

## Online Calculate Sum of Proper Divisors

Online tool for prime factorization and calculating sum of proper divisors. The algorithm is implemented in JavaScript and UI in Vue.js.

## [Golang] Digit fifth powers - Problem 30 - Project Euler

Go solution to Digit fifth powers - Problem 30 - Project Euler.

## Online Prime Factorization

Online tool that helps you do prime factorization. The algorithm is implemented in JavaScript and UI in Vue.js.

## [Vue.js] Online Sieve of Eratosthenes Demo

Sieve of Eratosthenes is a simple and ancient method to find prime numbers up to a given limit. Given a limit, this online demo returns all prime number below the limit.

## Online Sieve of Eratosthenes Demo via Go and Vue.js

Online demo of sieve of eratosthenes via Go/GopherJS/gopherjs-vue.

## [Vue.js] Online Euler's Totient Function Demo

Euler's Totient Function φ(n) counts the positive integers that are relatively prime to n. This online demo use naive method to calculate φ(n) and positive integers coprime to n.

## [Vue.js] Online Goldbach's Conjecture Demo

Goldbach's conjecture - Every even integer greater than 2 can be written as the sum of two primes. Given a positive even integer, this online demo returns the two primes.

## [JavaScript] Sieve of Eratosthenes

JavaScript implementation of Sieve of Eratosthenes.

## [Golang] Solution to Project Euler

Go solution to Project Euler.

## [Golang] Quadratic primes - Problem 27 - Project Euler

Go solution to Quadratic primes - Problem 27 - Project Euler.

## Check If A Large Number Is Divisible By 3 Or Not

Check if a large number is divisible by 3 or not in Go. This exercise is good example for type casting between int and string in Go.

## Online Lemoine’s Conjecture Demo in Go

2n + 1 = p + 2q always has a solution in primes p and q (not necessarily distinct) for n > 2. This online demo finds p and q for given odd number greater than 5. The demo is written in Go and compiled to JavaScript using GopherJS.

## Online Lemoine’s Conjecture Demo

2n + 1 = p + 2q always has a solution in primes p and q (not necessarily distinct) for n > 2. This online demo finds p and q for given odd number greater than 5.

## Lemoine’s Conjecture

2n + 1 = p + 2q always has a solution in primes p and q (not necessarily distinct) for n > 2. Write a Go program to find p and q for given odd number greater than 5.

## Lychrel Number Test

Test if a number (at least 2-digit) is Lychrel number or not under limited iterations in Go.

## Generate Fair Results From A Biased Coin

Given a biased coin with the probability of p to be head on each toss, where 0 < p < 1 and p ≠ 0.5, generate fair results from the biased coin.

## Generate Any One of Given Numbers According to Given Probabilities

Given N numbers, generate any one of the given numbers according to given probabilities.

## [Python] Set Difference of Two Arrays

Find set differecne of two arrays, i.e., the elements in one array but not in the other, in Python.

## [Python] Union of Two Arrays

Find the set of all elements (union) in two arrays in Python.

## [Python] Intersection of Two Arrays

Find common elements (matches, intersection) of two arrays in Python.

## [JavaScript] Set Difference of Two Arrays

Find set differecne of two arrays, i.e., the elements in one array but not in the other, in JavaScript.

## [Golang] Set Difference of Two Arrays

Find set differecne of two arrays, i.e., the elements in one array but not in the other, in Go.

## [JavaScript] Union of Two Arrays

Find the set of all elements (union) in two arrays in JavaScript.

## [JavaScript] Intersection of Two Arrays

Find common elements (matches, intersection) of two arrays in JavaScript.

## [Golang] Union of Two Arrays

Find the set of all elements in two arrays in Go programming language.

## [Golang] Intersection of Two Arrays

Find common elements (matches, intersection) of two arrays in Go programming language.

## [Golang] Lexicographic permutations - Problem 24 - Project Euler

Go solution to Lexicographic permutations - Problem 24 - Project Euler.

## [Golang] Non-abundant sums - Problem 23 - Project Euler

Go solution to Non-abundant sums - Problem 23 - Project Euler.

## [Golang] Number letter counts - Problem 17 - Project Euler

Go solution to Number letter counts - Problem 17 - Project Euler.

## [Golang] Convert Numbers to Words From 1 to 1000

Spell numbers from 1 to 1000 in English via Go programming language.

## [Golang] 1000-digit Fibonacci number - Problem 25 - Project Euler

Go solution to 1000-digit Fibonacci number - Problem 25 - Project Euler.

## [Golang] Factorial digit sum - Problem 20 - Project Euler

Go solution to Factorial digit sum - Problem 20 - Project Euler.

## [Golang] Large Positive Integer Multiplication

Multiplication of big natural numbers in Go. This is for very large positive integers which overflows the built-in numerical type in Go.

## [Golang] Power digit sum - Problem 16 - Project Euler

Go solution to Power digit sum - Problem 16 - Project Euler.

## [Golang] Lattice paths - Problem 15 - Project Euler

Go solution to Lattice paths - Problem 15 - Project Euler.

## [Golang] Large sum - Problem 13 - Project Euler

Go solution to Large sum - Problem 13 - Project Euler.

## [Golang] Large Positive Integer Addition

Addition of big natural numbers in Go. This is for very large positive integers which overflows the built-in numerical type in Go.

## [Golang] Largest product in a grid - Problem 11 - Project Euler

Go solution to Largest product in a grid - Problem 11 - Project Euler.

## [Golang] Even Fibonacci Numbers - Problem 2 - Project Euler

Go solution to Even Fibonacci numbers - Problem 2 - Project Euler.

## [Golang] Multiples of 3 and 5 - Problem 1 - Project Euler

Go solution to Multiples of 3 and 5 - Problem 1 - Project Euler.

This is not hard but still interesting. A spread of an array of numbers is the difference between its maximum and minimum. Given an array...

## Finding the maximum rectangle under a histogram

I heard this is classic, but turns out not too hard.

## Find pivot from a stream

This is also an interesting result, although it's quite simple.

## Finding singletons

For (iin{1,2,3}), there are (2n+i) integers consisting of (n+i) unique ones.

## Online number partitioning

A simple yet surprisingly interesting result.

## Numbers game

Given a sequence of (n) integers (a_1,ldots,a_n), we map it to ...

## No crossing!

On the 2D plane there are (n) blue and (n) red points, no three of them are co-linear. Then we can always pair a blue point with a red ...

## [Golang] Calculate Number of Divisors

Given a natural number (integer), calculate the number of divisors of it in Go programming language.

## [Golang] Highly Divisible Triangular Number - Problem 12 - Project Euler

Go solution to highly divisible triangular number - Problem 12 - Project Euler.

## [Golang] Longest Collatz Sequence - Problem 14 - Project Euler

Go solution to longest Collatz sequence - Problem 14 - Project Euler.

## [Golang] Summation of Primes - Problem 10 - Project Euler

Go solution to summation of primes - Problem 10 - Project Euler.

## [Golang] 10001st Prime - Problem 7 - Project Euler

Go solution to 10001st prime - Problem 7 - Project Euler.

## [Golang] Goldbach's conjecture

Goldbach's conjecture - Every even integer greater than 2 can be written as the sum of two primes. Given a positive even integer, write a Go program to find the two primes.

## [Golang] Euler's Totient Function

Euler's totient function implementation in Go programming language.

## [Golang] Calculate Least Common Multiple (LCM) by GCD

Find least common multiple (LCM) by greatest common divisor (GCD) via Go programming language.

## [Golang] Smallest Multiple - Problem 5 - Project Euler

Go solution to smallest multiple - Problem 9 - Project Euler.

## [Golang] Special Pythagorean Triplet - Problem 9 - Project Euler

Go solution to special Pythagorean triplet - Problem 9 - Project Euler.

## [Golang] Amicable Numbers - Problem 21 - Project Euler

Go solution to amicable numbers - Problem 21 - Project Euler.

## Maximum number of pairwise non-acute vectors in R^n

It is said to be well-known, but perhaps I've never seen it before:

## [Golang] Integer Exponentiation

Integer exponentiation in Go programming language.

## [Golang] Sum of the Proper Divisors (Factors)

Calculate the sum of all proper divisors (factors) of an integer number in Go programming language.

## [Golang] Largest Prime Factor - Problem 3 - Project Euler

Go solution to largest prime factor of 600851475143 - Problem 3 - Project Euler.

## [Golang] Greatest Common Divisor via Euclidean Algorithm

Compute the greatest common divisor (GCD) via Euclidean algorithm in Go programming language.

## [Golang] Get All Prime Factors of Integer Number

Prime Factorization - Find all prime factors of a given integer number in Go programming language.

## [Golang] Anagram Check by Characters Count

Check whether two strings are anagram of each other by characters count in Go programming language.

## [Golang] Check Whether Two Strings Are Anagram of Each Other

Check whether two strings are anagram of each other by sorting in Go programming language.

## [Golang] Longest Common Subsequence Length via Recursion

Compute the length of longest common subsequence via recursion in Go.

## [Golang] Largest Palindrome Product - Problem 4 - Project Euler

Go solution to largest palindrome made from the product of two 3-digit numbers. - Problem 4 - Project Euler.

## [Golang] Primality Test - Optimized School Method

Go implementation of primality test - optimized school method.

## [Golang] Sieve of Eratosthenes

Go implementation of Sieve of Eratosthenes.

## [Golang] Check if Integer is Palindromic Number

Check if an integer number is palindrome in Go programming language.

## [Golang] Wildcard Pattern Matching

Given a text and a wildcard pattern, implement wildcard pattern matching algorithm that finds if wildcard pattern is matched with text in Go programming language.

## [Golang] BK-tree Data Structure Implementation

Go implementation of BK-tree data structure used for approximate string matching in a dictionary. The distance metric here is Levenshtein distance, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.

## [Golang] Wagner-Fischer algorithm for Edit Distance of Two Strings

Go implementation of Wagner-Fischer algorithm that computes the edit distance between two strings of characters. The edit distance here is Levenshtein distance, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.

## [Golang] Levenshtein Distance Recursive Implementation

Recursive implementation of Levenshtein distance algorithm in Go programming language. Levenshtein distance (LD) is a measure of the similarity between two strings, the minimum number of single-character edits (insertions, deletions or substitutions) required to change one string into the other.

## [Golang] All Permutations of Given String With Distinct Characters

Find all permutations of a given string containing all distinct characters in Go programming language.

## [Algorithm] Magical Recurrence

In a recent algorithmic coding contest which I didn't do well, the hardest problem killed me. It distinguished me from other superior coders. But it's still an interesting one. The problem is essentially to solve a 0/1 knapsack problem on a tree where each node is associated with an …

Insane DFS