Skip to content

Instantly share code, notes, and snippets.

@EBojilova
Created May 6, 2015 11:55
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 EBojilova/82c8b95a8b38358109b6 to your computer and use it in GitHub Desktop.
Save EBojilova/82c8b95a8b38358109b6 to your computer and use it in GitHub Desktop.
04. Sequences of Equal Strings
using System;
using System.Collections.Generic;
using System.Linq;
class SequencesEqualStrings
{
static void Main(string[] args)
{
string[] input = Console.ReadLine().Split(' ');
var groups = input.GroupBy(name => name);
foreach (var group in groups)
{
Console.WriteLine(string.Join(" ",group));
}
Console.WriteLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment