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

Answers were Sorted based on User's Feedback



Write an algorithm to find an palindrome..

Answer / sagai

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
}
firstCnt++
secCnt--
}
return true //if loop completes without a false, is a
palinrome
}

Is This Answer Correct ?    20 Yes 9 No

Write an algorithm to find an palindrome..

Answer / 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

More Manual Testing Interview Questions

Explain test procedure and write test cases for EFTPOS/CREDIT CARD

0 Answers   People Bank,


What is the Jar file?

0 Answers  


What is Defect Seeding?

3 Answers  


why you want 2 join Testing ?

4 Answers   BMC,


I Have a login screen.Jus before the release you see the screen and there is a bug.Tell mde wats the bug. screen : Logen : Password : | Submit |(submit is a button)

6 Answers   Mind Tree, Trace,


Define brain stromming and cause effect graphing?

0 Answers  


What is the diff. between Sanity , smoke and ad-hoc testing?

8 Answers  


Can any body tell me in real time how cookies testing is done. And please tell me the steps.And for cookies testing test cases is needed.

0 Answers   Infosys,


hai friends can u expalin about real time process of testing at the company, like flow diagram

0 Answers  


How do we do Database testing?. How does our knowledge on SQL is useful in Database testing?. Please explain the process if possible.

2 Answers  


what is the difference between test strategy and test methodology?

3 Answers   Uniken,


A defect which could have been removed during the initial stage is removed in a later stage. How does this affect cost?

0 Answers  


Categories