01 April 2017

Add Border

My solution:
string[] addBorder(string[] picture)
{
    return new[] { new string('*', picture.Max(x => x.Length) + 2) }.Concat(picture.Select(x => "*" + x + "*")).Concat(new[] { new string('*', picture.Max(x => x.Length) + 2) }).ToArray();
}

Previous Next