You are given a nums representing the initial positions of several marbles. You are also given two moveFrom and moveTo of equal length.
Across moveFrom.length steps, you relocate the marbles. On the moveFrom[i] to position moveTo[i].
Return the sorted list of unique positions that contain at least one marble after completing all moves.
Constraints:
nums.length
moveFrom.length
moveFrom.length moveTo.length
nums[i], moveFrom[i], moveTo[i]
The test cases are generated such that there is at least one marble at moveFrom[i] when applying the
You are given a nums representing the initial positions of several marbles. You are also given two moveFrom and moveTo of equal length.
Across moveFrom.length steps, you relocate the marbles. On the moveFrom[i] to position moveTo[i].
Return the sorted list of unique positions that contain at least one marble after completing all moves.
Constraints:
nums.length
moveFrom.length
moveFrom.length moveTo.length
nums[i], moveFrom[i], moveTo[i]
The test cases are generated such that there is at least one marble at moveFrom[i] when applying the