Write an algorithm to find an palindrome
Answers were Sorted based on User's Feedback
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 |
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 |
what is v-model? explain it in detail?why we call it as v- model not an u-model?
write test case for gmail login page
i need manual testing interview questions for 2+ experience plzz help me..
test cases for bulb
you filed a bug that has high severity & high priority what happens till it gets fixed(that means what u do till it gets fixed)? Urgent
There are 20 resources out of which 12 are manual testers, 5 automation testers and 3 performance testers. There are a bunch of projects to be tested in the organisation, the projects belong to various technologies, say 20% of projects in Java, 20% of projects in SAP, 30% of projects in .NET, 30% of projects in C# What is your approach as Test Manager in testing.
what is Fault based testing?
how can u differentiate intgration test cases with functional test cases
How do u test any "web-site" as a secure site...? or How do you test the security of a web-site...?
1.What is bidirectional traceability ??? and how it is implemented? 2.What is Automation Test frame work ? 3. Define the components present in test strategy? 4. Define the components present in test plan? 5. Have u written Test plan ?…. thank u!plz reply........
What is the difference between Retesting and Data Driven Testing?
Can Anbody please send me Daily Work status format in which I can save my daily work activity