Can Someone please help me solve this in JAVA. It would be very much helpful.
Write a program to sort the given URLs based on their frequency. When two or more URLs
have same frequency count then print the lexicographically smaller URL first.
Example: –
www.google.com
www.fb.com
www.twitter.com
www.google.com
Output:-
www.google.com
www.fb.com
www.twitter.com
Given : (String[] S, int N)
Constraints :
1<=N<=10^5
1<=|S|<=100