Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static List<int> unio(int[] t, int[] q)
- {
- List<int> l = new List<int>();
- int segéd6;
- if (t.Length > q.Length)
- {
- segéd6 = t.Length;
- }
- else
- {
- segéd6 = q.Length;
- }
- for (int i = 0; i < segéd6; i++)
- {
- l.Add(t[i]);
- l.Add(q[i]);
- }
- for (int i = 0; i < l.Count; i++)
- {
- for (int j = 0; j < l.Count; j++)
- {
- if (l[i] == l[j] && i != j)
- {
- if (i < j) l.RemoveAt(j);
- else l.RemoveAt(i);
- }
- }
- }
- return l;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement