Given a string, if a length 2 substring appears at both its beginning and end, return a string without the substring at the beginning, so "HelloHe" yields "lloHe". The substring may overlap with itself, so "Hi" yields "". Otherwise, return the original string unchanged.
without2("HelloHe") → "lloHe"
without2("HelloHi") → "HelloHi"
without2("Hi") → ""
|Java - sorting a list of objects where the properties of the objects can change during the sort||7||47|
|how do i compare an object based on two fields||6||49|
|difference of if loops||23||43|
|tomcat not starting||6||32|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
26 Experts available now in Live!