how fix this error import java.util.*; import java.lang.*; import java.io.*; import java.lang.Math; publicclass Main { publicstaticint leftrightString(String
Fantastic news! We've Found the answer you've been seeking!
Question:
how fix this error
import java.util.*;
import java.lang.*;
import java.io.*;
import java.lang.Math;
publicclass Main {
publicstaticint leftrightString(String S) {
//this is default OUT
int result =0;
//write Logic here:
int i,j;
int count =0;
for(i =0; i < N; i++){
for(j =0; j < N; j++){
if(A[i] == A[j] && i != j)
break;
}
if(j == N ){
count++;
}
}
result = count ;
return result;
}
}
publicstaticvoid main(String args[])
{
Scanner sc=new Scanner(System.in);
//INPUT [uncomment & modify if required]
String S = sc.next();
//OUTPUT [uncomment & modify if required]
System.out.println(leftrightString(S));
}
}
Related Book For
Posted Date: