C++ Program to Implement the Schonhage-Strassen Algorithm for Multiplication

This is a C++ Program to implement Schonhage-Strassen algorithm to multiply two numbers. Here is source code of the C++ Program to Implement the Schonhage-Strassen Algorithm for Multiplication of Two Numbers. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include <iostream> using namespace std; int noOfDigit(long … Read more

advertisement

C++ Program to Generate Prime Numbers Using Sieve of Sundaram

This is a C++ Program to generate prime numbers within a given range using Sieve of Sundaram. Here is source code of the C++ Program to Generate Prime Numbers Between a Given Range Using the Sieve of Sundaram. The C++ program is successfully compiled and run on a Linux system. The program output is also … Read more

advertisement

C++ Program to Solve Linear Equation

This is a C++ Program to solve linear equation. This problem shows, solution to linear equations of N variable in general. Here is source code of the C++ Program to Solve any Linear Equation in One Variable. The C++ program is successfully compiled and run on a Linux system. The program output is also shown … Read more

advertisement

C++ Program to Implement Strassen’s Algorithm

This is a C++ Program to implement Strassen’s algorithm for matrix multiplication. In the mathematical discipline of linear algebra, the Strassen algorithm, named after Volker Strassen, is an algorithm used for matrix multiplication. It is faster than the standard matrix multiplication algorithm and is useful in practice for large matrices, but would be slower than … Read more

advertisement

C++ Program to Perform a 2D FFT Inplace Given a Complex 2D Array

This is a C++ Program to perform 2D FFT. A fast Fourier transform (FFT) is an algorithm to compute the discrete Fourier transform (DFT) and its inverse. Fourier analysis converts time (or space) to frequency and vice versa; an FFT rapidly computes such transformations by factorizing the DFT matrix into a product of sparse (mostly … Read more

advertisement

C++ Program to Implement Wheel Sieve to Generate Prime Numbers

This is a C++ Program to find prime number between a given range using Wheel Seive method. Wheel factorization is a graphical method for manually performing a preliminary to the Sieve of Eratosthenes that separates prime numbers from composites. Start by writing the natural numbers around circles as shown below. Prime numbers in the innermost … Read more

advertisement

C++ Program to Solve the 0-1 Knapsack Problem

This is a C++ Program to solve 0-1 knapsack problem. The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal … Read more

advertisement

C++ Program to Implement the Bin Packing Algorithm

This is a C++ Program to implement Bin packing algorithm. This is a sample program to illustrate the Bin-Packing algorithm using next fit heuristics. In the bin packing problem, objects of different volumes must be packed into a finite number of bins or containers each of volume V in a way that minimizes the number … Read more

advertisement

C++ Program to Implement Booth’s Multiplication Algorithm for Multiplication

This is a C++ Program to multiply two signed numbers using booth’s algorithm. Booth’s multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in two’s complement notation. Booth used desk calculators that were faster at shifting than adding and created the algorithm to increase their speed. Booth’s algorithm is of interest in … Read more

advertisement

C++ Program to Implement Coppersmith Freivald’s Algorithm

This is a C++ Program to implement Freivald’s algorithm to check if the 3rd matrix is the result of multiplication of the given two matrices. Here is source code of the C++ Program to Implement Coppersmith Freivald’s Algorithm. The C++ program is successfully compiled and run on a Linux system. The program output is also … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.