Zenon.ai Interview Question

They asked DSA question on array , optimised approach to return all duplicates elements in array