Remove Duplicate Character From String || Remove Repeated Character || Java Program
#java
#javadsa
#coding
0:00 Intro
0:12 Lecture
SOURCE CODE
public class strdupliRem {
public static void RemoveStrDup(boolean arr[],String str,StringBuilder str1,int indx){
if(str.length()==indx){
System.out.println(str1);
return;
}
char current= str.charAt(indx);
if(arr[current-'a']==true){
RemoveStrDup(arr, str, str1, indx+1);
}
else{
arr[current-'a']=true;
RemoveStrDup(arr, str, str1.append(str.charAt(indx)), indx+1);
}
}
public static void main(String[] args) {
String str=new String("chandramohanp");
StringBuilder str1=new StringBuilder("");
boolean[] arr=new boolean[26];
RemoveStrDup(arr,str,str1,0);
}
}
On this page of the site you can watch the video online Remove Duplicate Character From String | Remove Repeated Character | Java Program with a duration of hours minute second in good quality, which was uploaded by the user Bio to CS 25 August 2024, share the link with friends and acquaintances, this video has already been watched 36 times on youtube and it was liked by like viewers. Enjoy your viewing!