Leetcode 842. Split Array into Fibonacci Sequence
Given a string of digits, split it into at least three numbers that form a Fibonacci-like sequence (each number equals the sum of the previous two) without leading zeros and with each number fitting in a 32-bit signed int; return any valid split or [] if impossible. The core challenge is to choose the first two split points and then greedily/backtracking-extend the sequence to consume the entire string under those constraints.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.