This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public static int countPalindromes(String s) { | |
return findAllPalindromesUsingCenter(s); | |
} | |
public static int findAllPalindromesUsingCenter(String input) { | |
List<String> palindromes = new ArrayList<>(); | |
for (int i = 0; i < input.length(); i++) { | |
palindromes.addAll(findPalindromes(input, i, i + 1)); | |
palindromes.addAll(findPalindromes(input, i, i)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import beans.Animal; | |
import beans.Genus; | |
import beans.Location; | |
import beans.Species; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.Transaction; | |
import org.hibernate.cfg.Configuration; | |
import org.springframework.orm.hibernate5.HibernateTemplate; |
NewerOlder