Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Java または C# の 2 つの文字列配列から、値が一意である 3 番目の配列を作成する方法を 2 つのアルゴリズムで教えてください。
PHPについて話していると仮定します(タグを修正してください):
array_unique(array_merge($array1,$array2), SORT_REGULAR);
http://se2.php.net/manual/en/function.array-unique.php
c#
string[] c = a.Concat(b).Distinct().ToArray();