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

give me some interview ques?

1 Answers  


hi!!!!!!!!!!!! i heard there is a new type of testing i.e. YELLOW TESTING if anyone knows about it plz tell me. thanks

2 Answers  


how would we do the encryption and decryption testing

3 Answers   Wipro,


What all types of testing you will do for banking website?

0 Answers   HCL,


On login window for username and password auto populated field means what !

0 Answers  


Is a "A fast database retrieval rate" a testable requirement?

1 Answers   Honeywell,


What is TEST PLAN, TEST STRATEGY, TEST SCENARIO, TEST CASE, TEST SCRIPT? can any body give me definition with example.

1 Answers  


1.How to maintain the Bug status Report? 2.What is project based Company and product based company?

2 Answers   Mobius,


1)Asked to write test cases on Print option in a MS word application 2 Give scenarios for the following: throw a ball into bucket full of water and write scenarios so that water does not spill out. Explain test stratergy. What is localization. What do u test in localization?

1 Answers   Bally Technologies,


what is exit criteria and entry criteria with proper examples??? hi, i faced so many interwies in this question...so plz answer this questions as early as possible...

1 Answers   Covansys,


What are the non functional requirements?

5 Answers   CTS,


Anyone give me the Test Scenario template.

2 Answers   Virtusa,


Categories