Citations

References & Resources

All sources used in building this tutorial — textbooks, online references, and competitive programming resources.

Textbooks

Comprehensive treatments of algorithms, FFT, and polynomial methods.

Introduction to Algorithms, 4th Edition

Cormen, Leiserson, Rivest, Stein

Textbook

Chapter 30 — Polynomials and the FFT

The definitive algorithms textbook. Chapter 30 ("Polynomials and the FFT") provides a rigorous mathematical derivation of the DFT, the FFT algorithm, and polynomial multiplication. Includes proofs of correctness and complexity analysis.

2022

Competitive Programmer's Handbook

Antti Laaksonen

Textbook

Chapter 24 — Polynomial Multiplication

A freely available competitive programming reference. Chapter 24 covers polynomial multiplication via FFT and NTT, with concise implementation-focused explanations targeted at competitive programmers.

Online References

High-quality articles and documentation for deeper understanding.

Fast Fourier Transform — CP-Algorithms

CP-Algorithms contributors

Online

A comprehensive walkthrough of FFT for competitive programming. Covers recursive and iterative Cooley-Tukey implementations, NTT with mod 998244353, and practical tips for precision and performance.

2024 (continuously updated)Visit source →

Free Small FFT in Multiple Languages

Nayuki Minase

Online

Clean, minimal, and correct FFT implementations in C, C++, Java, JavaScript, Python, and more. Valuable as a correctness reference when debugging your own implementation.

Cooley–Tukey FFT Algorithm

Wikipedia contributors

Online

Covers the history of the FFT (Cooley & Tukey, 1965), the mathematical derivation of the divide-and-conquer recursion, and a description of the butterfly diagram. Good for understanding the algorithm's origins.

2024 (continuously updated)Visit source →

Competitive Programming Resources

Problem sets, templates, and libraries to level up your FFT skills.

FFT: From Numbers to Polynomials

jakobkogler (Codeforces)

Competitive Programming

A highly cited Codeforces blog post that motivates FFT through polynomial multiplication, covers precision issues with floating-point FFT, and introduces NTT as a remedy. Includes multiple worked examples.

A Comprehensive Introduction to the FFT

matthew99 (Codeforces)

Competitive Programming

Step-by-step derivation of FFT from the DFT definition, with emphasis on the iterative implementation and bit-reversal permutation. Also covers NTT and gives template code for competitive programming.

KACTL — KTH Algorithm Competition Template Library

KTH Royal Institute of Technology

Competitive Programming

content/numerical/FastFourierTransform.h

The template library used by KTH's ICPC teams, widely regarded as one of the best-maintained CP code libraries. The FFT and NTT implementations are battle-tested across hundreds of contest problems.

2024 (continuously maintained)Visit source →

Found a great resource?

Help improve this lab by suggesting high-quality references and resources for the community.

Suggest a resource →