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

Can anybody help me by sharing some knowledge on software testing life cycle, how testing process done under UT,IT,ST,PT,UAT.?please explai me briefly regarding this. Best Regards, Keerthana.

1 Answers  


what is regression testing & resting?

10 Answers   Wipro,


have you ever performed Back End Testing,HOW?

3 Answers  


is Business requirment doc is configurations item or not how you control configurations control

1 Answers  


How will u write test cases based on EQA(Equivalance class partitioning) & BVA(Boundary value analysis.?Plz explain in brief?

5 Answers  


What are the categories of writing test cases?

2 Answers  


why need testing ????

9 Answers   Synergy, TCS,


How to do manual testing of a E-insurance project (end to end process)

0 Answers   abc.com, Xchanging,


At what stage of the life cycle does testing begin?

6 Answers  


What is the differnt between Test condition and TesT Scenario

1 Answers   Ness Technologies,


What is the Database testing?? Is it necessary to have database knowledge for testing?had you ever tested the software by entering input at the front end and check it at back end?

1 Answers   Salus,


What r the features,u take care in prototype testing?

0 Answers   Satyam,


Categories