We’re rewarding the question askers & reputations are being recalculated! Read more.
1 of 4

C# (340)

Please pardon me if I did mistake in counting

using System;
using System.Collections.Generic;
using System.Linq;

class P
{        
    static void Main(String[] A)
    {           
        Dictionary<string,int> D=new Dictionary<string,int>();
        foreach(string s in A)
        {
            if(!D.ContainsKey(s))
                D.Add(s,1);
            else D[s]+= 1;
        }
        foreach(KeyValuePair<string,int> i in D.OrderByDescending(k=>k.Value))
            Console.WriteLine(i.Key+":" + i.Value);
    }
}

Output

enter image description here