Update appNew update is available. Click here to update.
About
Frontend developer with 7+ years of experience in JavaScript, Vue.js, Angular
Wipro Limited - Senior Software Engineer
Bhoj Reddy Engineering College for Women 2015
My Stats
EXP gained
yellow-spark
1960
Level
5 (Champion)
Community stats
Discussions
0
Upvotes
0
Know more
41
Total problems solved
38
Easy
3
Moderate
0
Hard
0
Ninja
Jan Jan Feb Feb Mar Mar Apr Apr May May Jun Jun Jul Jul Aug Aug Sep Sep Oct Oct Nov Nov Dec Dec

Current streak:

0 days

Longest streak:

19 days

Less

More

Discussions
JAVA simple Recursion
Interview problems

public class Solution {

public static boolean isPalindrome(String str) {

// base case

int i=0;

boolean result = palin(str,i);

return result;

}

 

public static boolean palin(String str, int i){

// base case

int n = str.length();

 

if(i >= n/2) return true;

if(str.charAt(i) != str.charAt(n-i-1)) return false;

i++;

return palin(str,i);

}

}

 

profile
Anju
Published On 20-Nov-2023
61 views
0 replies
0 upvotes