You are given two integer arrays source and target, both of the same length.
In one operation, you can perform the following steps:
Choose two distinct indices i and j.
Choose any integer delta.
Update source[i] to source[i] + source[j] - delta.
Update source[j] to delta.
Return true if it is possible to transform source into target after applying any number of operations, or false otherwise.
Constraints:
source.length target.length
source[i], target[i]
You are given two integer arrays source and target, both of the same length.
In one operation, you can perform the following steps:
Choose two distinct indices i and j.
Choose any integer delta.
Update source[i] to source[i] + source[j] - delta.
Update source[j] to delta.
Return true if it is possible to transform source into target after applying any number of operations, or false otherwise.
Constraints:
source.length target.length
source[i], target[i]