Practice Split Array into Fibonacci Sequence
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Split all digits of num into at least three integers forming a Fibonacci-like sequence: every value from the third onward must equal the preceding two values added together. Each value must lie from 0 through 2^31 - 1. A piece may not have leading zeros unless it is exactly 0. Return any valid sequence, or an empty list when none exists.
Source: Split Array into Fibonacci Sequence on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
num = "1101111"
[11,0,11,11]
# Example 2
num = "112358130"
[]
# Example 3
num = "0123"
[]
Constraints
Related LeetCode Problems
Practice more problems similar to Split Array into Fibonacci Sequence.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.