Kallol Bairagikallolbairagi.hashnode.dev·Oct 8, 2023#409.Longest Palindrome [LeetCode Grind 75 in Java]class Solution { public int longestPalindrome(String s) { int[] count = new int[128]; for(char c : s.toCharArray()) count[c] ++; int ans = 0; boolean onef = false; for(int freq : count){ //ev...LeetCode Grind 75 in JavaDSA
Ubuntu Tangubuntumeta.hashnode.dev·Mar 29, 2023Brute way to solve longest palindrome substring questionThe longest palindrome substring is an interesting question in computer science.Many people solve it in different ways. Today I will introduce the most direct way, the brute force solution to handle this problem.Actually, I wan to write it in javascr...63 readsJavaScript