- CountingPairs.java
Sample Input: 6 1 1 2 2 3 3 1
Sample Output: 2
- SuperStack.java
Sample Input: 4 push 1 push 2 inc 1 1 pop
Sample Output: 1 2 3 2
- UniqueArrayElementsSum.java
Sample Input: 5 1 3 2 4 7 Sample Output: 17
Note:
- To run the above programs need to set the Java Path in your machine,you can use this below link https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
- To compile use this below command javac fileName.java
- To run a program use this below command java fileName