Merge Names


C# Arrays Public New

Easy 

10min


Implement the UniqueNames method. When passed two arrays of names, it will return an array containing the names that appear in either or both arrays. The returned array should have no duplicates.

For example, calling MergeNames.UniqueNames(new string[]{'Ava', 'Emma', 'Olivia'}, new string[]{'Olivia', 'Sophia', 'Emma'}) should return an array containing Ava, Emma, Olivia, and Sophia in any order.

C# 7.0, .NET Framework 4.7
   

  •   Example case: System.NotImplementedException at MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.cs:line 7
  •   Each array has distinct names: System.NotImplementedException at MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.cs:line 7
  •   Each array has duplicate names: System.NotImplementedException at MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.cs:line 7
  •   Arrays have some names in common: System.NotImplementedException at MergeNames.UniqueNames(String[] names1, String[] names2) in MergeNames.cs:line 7