Finding repeated items in a array using array manipulation methods

In reply to sasi_8985:

If there was a built-in function to “finds repeated items in an array” that returns an array of repeated items, then, for sure go ahead and use that.

In this case, you are combining multiple built-in functions(find_first/last and unique), and not to mention, you have nested find.

While a single atomic built-in function may be the most efficient; a combination of built-in functions does not guarantee better performance or readable code.

As you noticed in your experiment, it’s not trivial to complete your code to get the desired output :)

Occam’s razor ?