Is String A ?
▻https://hackernoon.com/is-string-a-1b6e73c82bb4?source=rss----3a8144eabfe3---4
Is String A #palindrome?You are given a string and are asked to write a method to return true if the string is a palindrome and to return false otherwise. A palindrome is a string that reads the same from front to back like alulaThey are many solutions to check if a string is a palindrome. I’m going to show you three solutions. The first will use a StringBuilder and the second will use a Character Array to solve the problem. For the third solution, we will solve the problem in-place.Solution Using StringBuilder▻https://medium.com/media/023c5b81f9c3c99941d518ab34b04881/hrefIn this solution we:Create a StringBuilder on line 3.Reverse the StringBuilder and create a new String on line 5.Use the equals method to see two strings are the same on line 6.Solution Using (...)
#programming #software-engineering #java #is-string-a-palindrome