Practice Find First Palindromic String in the Array
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given an array of strings words, return the first palindromic string in the array. If there is no such string, return an empty string "". A string is palindromic if it reads the same forward and backward.
Source: Find First Palindromic String in the Array on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
words = ["abc","car","ada","racecar","cool"]
Output
"ada"
# Example 2
Input
words = ["notapalindrome","racecar"]
Output
"racecar"
# Example 3
Input
words = ["def","ghi"]
Output
""
Constraints
1 <= words.length <= 100
1 <= words[i].length <= 100
words[i] consists only of lowercase English letters.
Related LeetCode Problems
Practice more problems similar to Find First Palindromic String in the Array.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.