You are given an integer array
orderof lengthnand an integer arrayfriends.
ordercontains every integer from 1 tonexactly once, representing the IDs of the participants of a race in their finishing order.friendscontains the IDs of your friends in the race sorted in strictly increasing order. Each ID in friends is guaranteed to appear in theorderarray.Return an array containing your friends’ IDs in their finishing order.
1 | class Solution { |