public class WordCount{
public static void main(String []args){
   //args = practice makes perfect. get perfect by practice. just practice!"
   
   HashMap<String, Integer> result = new HashMap<String, Integer>();
   //Regex
   args.replace("!", "");
   args.replace(".", "");
   
   //args = practice makes perfect get perfect by practice just practice"
   
   String[] array = args.split(" "); //9 strings separately
   
   for(int i=0;i<array.length;i++){------------------------->O(n)
      if(result.containsKey(array[i])){
         int count = result.get(array[i]);
         result.put(array[i], ++count);
      }
      else{
         result.put(array[i], 1);
      }
   }
   
   TreeMap<Integer, ArrayList<String>> hmapNew = new TreeMap<>(Collections.reverseOrder());
   for(EntrySet<String, Integer> es : result.getEntrySet()){------------->O(n)
      if(hmapNew.containsKey(es.getValue())){
         ArrayList<String> al = hmapNew.get(es.getValue());
         al.add(es.getKey());
         hmapNew.put(es.getValue(), al);
      }
      else{
         ArrayList<String> al = new ArrayList<String>();------------>O(n)
         al.add(es.getKey());
         hmapNew.put(es.getValue(), al);
      }
   }
   
   for(EntrySet<Integer, ArrayList<String>> finalES : hmapNew.getEntrySet()){--->O(n)
      for(int x=0;x<finalES.getValue().length;x++){--->O(k)
         System.out.println(finalES.Value.get(x)+":"+es.getKey());
      }      
   }
}
   
//O(n.k) n->strings k->average number of strings in the arraylist
}

@@ -1,12 +1,313 @@
+//*******************************************************************%0A// NOTE: please read the 'More Info' tab to the right for shortcuts.%0A//*******************************************************************%0A%0Aimport java.lang.Math; // headers MUST be above the first class%0A%0Aimport java.util.HashMap;%0A
 public class
@@ -311,17 +311,18 @@
 ass 
-WordCount
+HelloWorld
 %7B%0Apu
@@ -358,33 +358,38 @@
 %5B%5Dargs)%7B%0A   
-//args
+String inp
  = 
+%22
 practice mak
@@ -440,16 +440,17 @@
 actice!%22
+;
 %0A   %0A   
@@ -528,21 +528,29 @@
 Regex%0A  
- args
+%0A  %0A  %0A   inp
 .replace
@@ -563,20 +563,19 @@
 %22%22);%0A   
-args
+inp
 .replace
@@ -687,20 +687,19 @@
 array = 
-args
+inp
 .split(%22
@@ -765,16 +765,18 @@
 th;i++)%7B
+//
 --------
@@ -1144,16 +1144,18 @@
 ySet())%7B
+//
 --------
@@ -1418,16 +1418,18 @@
 ring%3E();
+//
 --------
@@ -1603,16 +1603,18 @@
 ySet())%7B
+//
 ---%3EO(n)
@@ -1665,16 +1665,18 @@
 th;x++)%7B
+//
 ---%3EO(k)

Update WordCount.java