online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it. *******************************************************************************/ import java.util.*; public class Main { static int singleNumber(int [] nums) { TreeSet<Integer> seen = new TreeSet<Integer>(); TreeSet<Integer> unseen = new TreeSet<Integer>(); for(int num:nums) { if(seen.contains(num)) unseen.remove(num); else unseen.add(num); seen.add(num); } return unseen.first(); } public static void main(String[] args) { System.out.println(String.format("%d", singleNumber(new int[]{1,3,3,1,3,4}))); } }

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