30-seconds / 30-seconds-of-code

Short code snippets for all your development needs

Home Page:https://30secondsofcode.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge two arrays and remove duplicate elements

KushalUpreti opened this issue · comments

Merges two or more arrays and removes any duplicate values i.e. [1,2,3] & [2,3,4] & [4,5,6] = [1,2,3,4,5,6]
Can use Map or Set for implementing the solution in O(N) time complexity

Can I start working on this snippet?

This already exists in the form of union.