Algorithms Legendre's conjecture In this article, we have explained Legendre's conjecture, presented an implementation of an Algorithm to verify Legendre's conjecture till a given limit and have provided output which you can analyze.
Algorithms Goldbach's Conjecture In this article, we shall be looking at the intriguing Goldbach's Conjecture, one of the best known unsolved problems in mathematics. Later on, in the article, we shall find the Goldbach pairs of all numbers that range from 1000 to 2000.
Algorithms Fermat’s Last Theorem In this article, we will be talking about Fermat's Last Theorem , also called as Fermat's Great theorem. Stated by Pierre de Fermat in around 1637 in a margin of his copy of Arithmetica. A Nightmare for Mathematicians to prove.
List of Mathematical Algorithms Pollard’s rho algorithm for factorization Pollard's Rho Algorithm is a very interesting and quite accessible algorithm for factoring numbers. It was invented by John Pollard in 1975. It is not the fastest algorithm by far but in practice it outperforms trial division.
Algorithms Sum and Number of Divisors of a Number In this post, we discuss formulas for getting the number of divisors of a number and their sum, additionally we will implement an algorithm that solves this problem.
Algorithms Reverse bits of an Integer In this article, we have explored an efficient algorithm to Reverse bits of an Integer. The challenge is to do this in-place without using auxiliary memory.
Algorithms Reverse Integer In this article, we will explore an efficient algorithm to reverse a 32 bit Integer. This involve edge cases where the reverse integer is out of bounds.
Algorithms GCD Sort of an Array In this article, we have explored an insightful approach/ algorithm to sort an array by comparing the Greatest Common Divisor of two of the elements.
Algorithms Roman to Integer In this article, we have explained two efficient approaches / algorithms to convert Roman number to Integer. We have presented the implementation as well.
Algorithms K-th permutation of first N integers In this article, we will understand and explore about the concept of generating k-th lexicographical permutation of first N integers. There are O(N!) permutations but you can find it in O(N) time.
Algorithms 4 Sum problem In this article, we have explored an insightful approach/ algorithm to find the 4 elements in an array whose sum is equal to the required answer (4 Sum problem). This concept finds many uses in computational geometry.
Algorithms Integer to Roman Numeral Conversion In this article, we have presented the algorithm to Convert Integer to Roman Numerals along with C++ implementation and step by step implementation.
Algorithms Number of Ordered Solution Pairs (X, Y) satisfying 1/X + 1/Y = 1/N We have explored two insightful approaches/ algorithms to find the Number of Ordered Solution Pairs (X, Y) satisfying 1/X + 1/Y = 1/N. This problem is used extensively in Astrophysics.
Algorithms Different ways to calculate Pi (3.14159...) We have covered different algorithms and approaches to calculate the mathematical constant pi (3.14159...). These include Nilakantha Series, Leibniz’s Formula, Ramanujan's Pi Formula and other Programming Language specific techniques.
List of Mathematical Algorithms Number of integers between 1 and N that are coprime to N We have explored efficient approaches to find Number of integers between 1 and N that are coprime to N. We have presented the idea of Euler φ (phi) function and is an important topic to get hold on Mathematical Algorithms.
Algorithms Finding the twin primes up to N (Twin Prime Conjecture) We will learn about prime numbers and the twin prime conjecture. We will also look at an efficient algorithm for finding the first twin prime pairs up to a number N.
Algorithms Count total set bits in all numbers from 1 to N We have presented an efficient approach to find the total number of set bits in all numbers from 1 to N in O(logN) time by deriving a pattern and a formula.
Algorithms Integer Factorization Algorithms We have explored in great detail some of the different factorization algorithms for Integers such as Trial Division, Pollard's rho algorithm, Dixon's algorithm and Quadratic Sieve.
Algorithms Adding 2 integers as linked lists We will represent an Integer as Singly Linked List and define an addition algorithm to add two integers as Linked Lists. This is used to add very large integers which is not stored in existing data types.
Algorithms Swap 2 variables [6+ techniques] We have explored about Swapping of 2 variables. We have presented different methods to do so including swapping using third variable, using arithmetic operations, XOR, macro and much more along with their pros and cons.
Time Complexity Time Complexity of Addition Operation We have demonstrated the Time Complexity analysis of Addition operation. It is assumed to take constant time O(1) but it takes linear time O(N) in terms of number of bits. We have presented the space complexity along with implementation of addition using bitwise operations.
Algorithms Lempel Ziv Welch compression and decompression In this article, we will learn about the Lempel Ziv Welch compression and decompression algorithm, a famous compression technique that is widely used in Unix systems and GIF format files
Algorithms Lomuto Partition Scheme We have explained the Lomuto partition scheme, which is used in the famous Quicksort algorithm. It is an algorithm to partition an array into two parts based on a given condition.
Algorithms Probability of Collision in Hash Function [Complete Analysis] We present the Mathematical Analysis of the Probability of Collision in a Hash Function. You will learn to calculate the expected number of collisions along with the values till which no collision will be expected and much more.
Algorithms Shuffle an array [2 approaches] We have explored two approaches to shuffle an array. The first approach uses an auxiliary array while the second approach is in-place and is known as Fisher Yates Algorithm.