How To Find Duplicates In Array In Typescript Interview