LeetCode Solutions/LeetCoding Challenge/June 2020 LeetCoding Challenge/Remove All Adjacent Duplicates In String.java
class Solution {
    public String removeDuplicates(String s) {
        StringBuilder sb = new StringBuilder();
        for(char c : s.toCharArray()){
            if(sb.length() > 0 && sb.charAt(sb.length() - 1) == c){
                sb.deleteCharAt(sb.length() - 1);
            } else{
                sb.append(c);
            }
        }
        return sb.toString();
    }
}