


1: 0 <= F[i] <= 2^31 - 1, (that is, each integer fits a 32-bit signed integer type);
2: F.length >= 3;
3: and F[i] + F[i+1] = F[i+2] for all 0 <= i < F.length - 2.
Input: "123456579"
Output: [123, 456, 579]
Explanation:
Since 123 + 456 = 579, therefore the given string can be broken into fibonacci sequence
The first line of input contains a single integer ‘T’ denoting the number of test cases given.
The first line of each test case input contains a string that is required to be broken into different Fibonacci sequences.
For every test case, Return the first Fibonacci-like sequence list (array) which can be formed by splitting from S, or return [] if it cannot be done.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= S.length <= 200
Time Limit: 1 sec
Using the above intuition, we can formalize the following concept that, the first two elements which our resultant Fibonacci sequence list (array) will contain, uniquely helps us determine and figure out the rest of the sequence.
For each of the first two elements, assuming they have no leading zero, let's iterate through the rest of the string. At each stage, we expect a number less than or equal to 2^31 - 1 that starts with the sum of the two previous numbers.
The algorithm to calculate the required smallest difference will be:-