Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write an algorithm to find an palindrome

Answer Posted / nandan_101

boolean isPalindrome(string s){
char[] letters = s.toCharArray() //convert string to
array of characters
int firstCnt = 0 //counter for left side
int secCnt = letters.length - 1 //counter for right
side
while (firstCnt < secCnt){ //work toward middle
if (letters[firstCnt] != letters[secCnt]){
return false //if left and right does not
match, is not a palindrome
}
}
return true //if loop completes without a false, is a
palinrome
}boolean isPalindrome(string s){
char[] letters = s.toCharArray() //convert string
<strong class="highlight">to</strong> array of characters
int firstCnt = 0 //counter for left side
int secCnt = letters.length - 1 //counter for right
side
while (firstCnt < secCnt){ //work toward middle
if (letters[firstCnt] != letters[secCnt]){
return false //if left and right does not
match, is not a <strong
class="highlight">palindrome</strong>
}
}
return true //if loop completes without a false, is a
palinrome
}

Is This Answer Correct ?    5 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi friends, Im an MBA Finance, 2 yrs of exp workng in Investment com, + around 2 yrs of exp in Manual testing in Finane domain. Im looking for manual testing jobs but not getting any calls, Im worried is manual tesing in finance domain do have any good scopes in future or not. Plz provide me ur valuable suggestion,so tht I can best decision to retain in this platform(manual testing). or not

2339


Diffrence b/w functional testing,functionality testing,system testing?

2094


10 scenarios for security testing using gmail applications?

8529


Please anyone give answers for all below questions and help ? realtimers please and please share your knowledge.lot of questions left unanswered.

1954


Why do you need to parameterize fields in your virtual user script?

2149


Relative to other technical groups in the company? Relative to your staff?

1916


How do you know the code has met specifications?

1398


What is six sigma?

1310


1. Give me an example of something you tried at work but did not work out so you had to go at things another way. can somebody give a real time example

2464


What and why is api testing?

1461


What is the full form of cmmi?

1306


What is the Difference between Network testing and Web Testing?

2279


How do u go about testing of web application?

2121


can any one post the format of tracebility martrix Plz...... Maid Id: sandhya.shyamala@yahoo.com

2258


Beyond the customary advantages of having a testing group, what are the benefits does a company receive from a well run, automated testing group?

3415