--

Just thought I'd point out that your functional example has a greater time complexity than the procedural one, and it's actually _two_ loops.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)