using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
List<string> input = new List<string>() {"Apple", "Pear", "Apple", "Pineapple", "Strawberry", "Apple", "Strawberry"};
Console.WriteLine(MyFruit(input)); // expected results: "Apple Apple Apple Strawberry Strawberry Pear Pineapple"
}
// Given a list of elements
// Return all elements in a string in the order of the most occurring
public static string MyFruit(List<string> input)
return string.Join(" ", input);