Spell
Spell
*;
import java.util.*;
public class spell {
int findValue(String a,String b) {
char[] c=a.toCharArray();
char[] d=b.toCharArray();
int temp=c.length-1;
int count=0;
}
{
if(c.length>=d.length)
{
for(int i=d.length-1;i>=0;i--)
{
if(d[i]==c[temp])
{
count++;
temp--;
}
}
}
if(count==d.length)
{
return 1; {
else
return 0;
}
public class Main {