Problem 3708 · Medium

Longest Fibonacci Subarray

Extend a run by one whenever a value is the sum of the two before it, and restart the run at two otherwise.

Open the interactive visualisation