@@ -0,0 +1,769 @@
+package com.sunny.grokkingalgorithms.boot2019.phleps;%0A%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Apublic class RemoveDuplicateElementsFromString %7B%0A%0A%0A    public static char%5B%5D removeDuplicates(char%5B%5D input)%7B%0A        Set%3CCharacter%3E trackerSet = new HashSet%3C%3E();%0A        StringBuilder stringBuilder = new StringBuilder();%0A        for(int i = 0 ; i %3C input.length ; i++)%7B%0A            if(!trackerSet.contains(input%5Bi%5D))%7B%0A                stringBuilder.append(input%5Bi%5D);%0A                trackerSet.add(input%5Bi%5D);%0A            %7D%0A        %7D%0A        return stringBuilder.toString().toCharArray();%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        char str%5B%5D = %22geeksforgeeks%22.toCharArray();%0A        System.out.println(String.valueOf(removeDuplicates(str)));%0A    %7D%0A%7D%0A

Remove duplicate elements using hashig.