LeetCode --- 2108. Find First Palindromic String in the Array 解题报告

Question:

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.

Example 1:

Input: words = ["abc","car","ada","racecar","cool"]
Output: "ada"
Explanation: The first string that is palindromic is "ada".
Note that "racecar" is also palindromic, but it is not the first.

Example 2:

Input: words = ["notapalindrome","racecar"]
Output: "racecar"
Explanation: The first and only string that is palindromic is "racecar".

Examp

相关推荐

  1. LeetCode --- 2103. Rings and Rods 解题报告

    2024-07-12 10:58:01       17 阅读
  2. LeetCode --- 2129. Capitalize the Title 解题报告

    2024-07-12 10:58:01       18 阅读
  3. LeetCode --- 2000. Reverse Prefix of Word 解题报告

    2024-07-12 10:58:01       61 阅读
  4. LeetCode --- 2032. Two Out of Three 解题报告

    2024-07-12 10:58:01       44 阅读
  5. LeetCode --- 2057. Smallest Index With Equal Value 解题报告

    2024-07-12 10:58:01       35 阅读
  6. LeetCode --- 2073. Time Needed to Buy Tickets 解题报告

    2024-07-12 10:58:01       22 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-12 10:58:01       66 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-12 10:58:01       70 阅读
  3. 在Django里面运行非项目文件

    2024-07-12 10:58:01       57 阅读
  4. Python语言-面向对象

    2024-07-12 10:58:01       68 阅读

热门阅读

  1. Spring Boot实战:无缝对接OpenAI

    2024-07-12 10:58:01       20 阅读
  2. MVVM和MVC的原理以及它们的区别

    2024-07-12 10:58:01       24 阅读
  3. stopSelf 会走ondestory吗? 怎么关闭server

    2024-07-12 10:58:01       24 阅读
  4. YOLOv10单独推理的封装

    2024-07-12 10:58:01       16 阅读
  5. c#的几种通信

    2024-07-12 10:58:01       18 阅读
  6. 前端代码规范

    2024-07-12 10:58:01       19 阅读
  7. MATLAB——字符串处理

    2024-07-12 10:58:01       20 阅读
  8. qt 自定义信号号槽 简单举例

    2024-07-12 10:58:01       23 阅读
  9. 2024年啦,你的信息系统还没做等保吗?

    2024-07-12 10:58:01       22 阅读
  10. 引入时间概念的分布式系统浅谈

    2024-07-12 10:58:01       21 阅读