Tap here to switch tabs
Problem
Submissions

Problem: Find First Palindromic String in the Array

Find First Palindromic String in the Array asks you to return the first string that reads the same forward and backward, or an empty string if none exists.

Statement

Given an array of strings words, return the first palindromic string in the array. If no palindromic string is present, return an empty string "".

Note: A string is palindromic if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find First Palindromic String in the Array

Find First Palindromic String in the Array asks you to return the first string that reads the same forward and backward, or an empty string if none exists.

Statement

Given an array of strings words, return the first palindromic string in the array. If no palindromic string is present, return an empty string "".

Note: A string is palindromic if it reads the same forward and backward.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤100\leq 100

  • words[i] consists only of lowercase English letters.