Skip to main content

Practice · 1 of 3

Checked Allocation Math

CHALLENGE
Difficulty: advanced+25 XP

Implement checkedTotal(a,b,c) returning a*b*c or nullopt on ANY intermediate overflow. The battery uses SIZE_MAX-class extremes.

Back to lesson: Practice: Practice: Hardening Battery