Skip to content

Instantly share code, notes, and snippets.

@vdonchev
Created August 19, 2015 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdonchev/33cea5d71a5aebd3d3e5 to your computer and use it in GitHub Desktop.
Save vdonchev/33cea5d71a5aebd3d3e5 to your computer and use it in GitHub Desktop.
namespace JoinLists
{
using System;
using System.Collections.Generic;
using System.Linq;
class JoinLists
{
static void Main(string[] args)
{
List<int> list =Console.ReadLine().Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();
list.AddRange(Console.ReadLine().Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse));
list.Sort();
Console.WriteLine(string.Join(" ", list.Distinct()));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment