Fibonacci-like sequence split
Your task
Given a string num of digits (length 1..30), split it into a sequence of non-negative integers that forms a Fibonacci-like sequence: every number (from the third on) equals the sum of the previous two. The sequence must have at least 3 numbers, no number may have a leading zero (except the single digit '0'), and every value must fit in a signed 32-bit integer (< 2^31). Return any one valid split as a list of integers, or an empty list if none exists.
Examples
split_into_fibonacci(num: str) -> list[int]Example 1
Input
split_into_fibonacci("1101111")Output
[11, 0, 11, 11]