@@ -0,0 +1,702 @@
+package com.sunny.grokkingalgorithms.gfg.nfx;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0A/**%0A * Created by sundas on 5/23/2018.%0A */%0Apublic class RemoveDuplicatesFromAString %7B%0A%0A  public static String removeDuplicates(String s)%7B%0A    Set%3CCharacter%3E tracker = new HashSet%3C%3E();%0A    StringBuilder builder = new StringBuilder();%0A    for(int i = 0 ; i %3C s.length() ; i++)%7B%0A      final char e = s.charAt(i);%0A      if(!tracker.contains(e))%7B%0A        builder.append(e);%0A        tracker.add(e);%0A      %7D%0A    %7D%0A    return builder.toString();%0A  %7D%0A%0A  /**%0A   *%0A   * @param args%0A   */%0A  public static void main(String%5B%5D args) %7B%0A    String s = %22dgterttyrj,mi,iy%22;%0A    System.out.println(removeDuplicates(s));%0A  %7D%0A%7D%0A

Remove duplicates in a strinmg.