Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

You Could Have Invented Fenwick Trees

ACM SIGPLAN via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Explore the mathematical derivation and implementation of Fenwick trees (binary indexed trees) through this 23-minute conference presentation from ICFP 2025. Begin with segment trees as a foundational, purely functional approach to maintaining sequences with efficient updates and range queries, then follow the equational reasoning that leads to the optimized Fenwick tree implementation. Understand how the seemingly mysterious bitwise operations on indices emerge naturally from mathematical transformations, demystifying one of computer science's most elegant data structures. Learn through a Haskell embedded domain-specific language (EDSL) designed for operations on infinite two's complement binary numbers, making the abstract concepts concrete and verifiable. Gain insight into how complex algorithmic optimizations can be systematically derived rather than discovered through trial and error.

Syllabus

[ICFP'25] [JFP] You could have invented Fenwick trees

Taught by

ACM SIGPLAN

Reviews

Start your review of You Could Have Invented Fenwick Trees

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.