SHOPLINE Limited Interview Question

Code test with deduplicate smallest array