You are viewing a single comment's thread. Return to all comments →
public static String funnyString(String s) { // Write your code here for(int i=1;i<s.length()/2+1;i++){ if(Math.abs(s.charAt(i)-s.charAt(i-1))!=Math.abs(s.charAt(s.length()-i-1)-s.charAt(s.length()-i))){ return "Not Funny"; } } return "Funny"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Funny String
You are viewing a single comment's thread. Return to all comments →