C++ Program to Compute Discrete Fourier Transform Coefficients

This is a C++ Program to compute the coefficients of the DFT (Discrete Fourier Transform) directly. In mathematics, the discrete Fourier transform (DFT) converts a finite list of equally spaced samples of a function into the list of coefficients of a finite combination of complex sinusoids, ordered by their frequencies, that has those same sample … Read more

advertisement

C++ Program to Compute Discrete Fourier Transform using Naive Approach

This is a C++ Program to perform Discrete Fourier Transform using Naive approach. In mathematics, the discrete Fourier transform (DFT) converts a finite list of equally spaced samples of a function into the list of coefficients of a finite combination of complex sinusoids, ordered by their frequencies, that has those same sample values. It can … Read more

advertisement

C++ Program to Solve Knapsack Problem Using Dynamic Programming

This is a C++ Program to knapsack problem using dynamic programming. 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 … Read more

advertisement

C++ Program to Emulate N Dice Roller

This is a C++ Program to emulate N-dice roller. This can be done by generating random number between 1-6. Here is source code of the C++ Program to Emulate N Dice Roller. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include <iostream>#include <stdlib.h> using namespace … Read more

advertisement

Extended Euclidean Algorithm in C++

This C++ Program demonstrates the implementation of Extended Eucledian Algorithm. For the modular multiplicative inverse to exist, the number and modular must be coprime. Here is source code of the C++ Program to implement Extended Eucledian Algorithm. The C++ program is successfully compiled and run on a Linux system. The program output is also shown … Read more

advertisement

Fermat’s Little Theorem in C++

This C++ Program demonstrates the implementation of Fermat’s Little Theorem. For the modular multiplicative inverse to exist, the number and modular must be coprime. Here is source code of the C++ Program to implement Fermat’s Little Theorem. The C++ program is successfully compiled and run on a Linux system. The program output is also shown … Read more

advertisement

Euler Theorem in C++

This C++ Program demonstrates the implementation of Euler Theorem. For the modular multiplicative inverse to exist, the number and modular must be coprime. Here is source code of the C++ Program to implement Euler Theorem. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /* … Read more

advertisement

C++ Program to Implement Solovay-Strassen Primality Test

This C++ Program demonstrates the implementation of Solovay-Strassen Primality Test. Here is source code of the C++ Program to demonstrate the implementation of Solovay-Strassen Primality Test. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /*  * C++ Program to Implement Solovay-Strassen Primality Test */#include <cstring>#include … Read more

advertisement

C++ Program to Implement Segmented Sieve

This C++ Program demonstrates the implementation of Segmented Sieve. Here is source code of the C++ Program to demonstrate the implementation of Segmented Sieve. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /*  * C++ Program to Implement Segmented Sieve */#include <iostream>#include <cstring>#define MAX 46656#define … Read more

advertisement

C++ Program to Implement Sieve of Atkins

This C++ Program demonstrates the implementation of Sieve of Atkins. Here is source code of the C++ Program to demonstrate the implementation of Sieve of Atkins. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /*  * C++ Program to Implement Sieve of Atkins */#include <iostream>#include … 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.