online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
import java.util.*; public class Main{ static class Element{ int value,freq; Element(int value,int freq){ this.value = value; this.freq = freq; } } public static void main(String[] args) { sort(new int[]{2,2,4,5,7,6,4,8,3,9,5,7,2}); } public static void sort(int a[]){ Map<Integer,Integer> map = new HashMap<>(); for(int i=0;i<a.length;++i){ map.merge(a[i], 1, Integer::sum); } PriorityQueue<Element> pq = new PriorityQueue<Element>(1000,(c,d) -> (d.freq - c.freq)); for(Map.Entry<Integer,Integer> m : map.entrySet()){ pq.offer(new Element(m.getKey(),m.getValue())); } while(!pq.isEmpty()){ Element e = pq.poll(); System.out.println(e.value + " => " + e.freq); } } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue