#3668

Restore Finishing Order

newbie · 100 · lc easy +12 · 91% accepted · 112 likes · top 100%

Description

The array order lists race participant IDs from 1 to n in finishing sequence. The array friends contains a subset of IDs (sorted in ascending order) that belong to your friends. Return the IDs of your friends arranged according to their actual finishing positions in order.

Code

1
2
3