2020-6: Move to the Front

Write code that, given a second argument which is an integer vector and a first argument which is an integer scalar, reorders the second argument so any elements equal to the first argument come first while all other elements keep their order.

Examples

Implementation

You can also run the tests via ⌘/shift + enter