title: How to remove adjacent duplicates in a string in Java
body: <p>I've been looking for this answer for a while.
  I've found numbers of solutions for removing duplicates using a HashSet or LinkedHashSet but they all remove all duplicates, I'm looking for only the adjacent ones. "
  Say a string is "ABBCDAABBBBBBBBOR" 
  The required result should be "ABCDABOR" and not "ABCDOR".
  Could this be achived in O(n) ? Thanks.</p>