Location Of Data After Transfers
X stores its data on different servers at different locations. From time to time, due to several factors, X needs to move its data from one location to another. This challenge involved keeping track of the locations of X's data and report them at the end of the year.
At the start of the year, X's data was located at n different locations. Over the course of the year, X's data was moved from one server to another m times. Precisely, in the ith operation, the data was moved from movedFrom[i] to movedTo[i]. Find the locations of the data after all m moving operations. Return the locations in ascending order.
Note:
It is guaranteed that for any movement of data :
Returns
int[]: the locations storing data after all moves are made, in ascending order.
1Example 1
2Example 2

3Example 3
Constraints
Limits and guarantees your solution can rely on.
N/A (If you know about it, feel free to contact us. THX!