Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 533 Bytes

File metadata and controls

23 lines (15 loc) · 533 Bytes

Get duplicated arguments

Instructions

Given variable number of arguments (list of strings) checks whether there are any duplicates among the arguments and return list of all unique duplicates. If no arguments are passes return empty list.

challenge | solution

Examples

getDuplicatedParams("a", "b", "c") //empty list

getDuplicatedParams("a", "b", "c", "a") // [a]

Hints

Hint 1 Use frequency counter or multiple pointers pattern.