作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 正则+字典 日期 题目地址:https://leetcode.com/problems/camelcase-matching/ 题目描述 A query word matches a given pattern if we can insert lowercase letters to the pattern word so that it equa…
暴力查找 class Solution: def camelMatch(self, queries: List[str], pattern: str) -> List[bool]: q_size=len(queries) p_size=len(pattern) ans=[True for i in range(q_size)] for i,query in enumerate(queries): idx=[query.find(pattern[0])] if idx[-1]==-1: ans[i…
题目如下: A query word matches a given pattern if we can insert lowercaseletters to the pattern word so that it equals the query. (We may insert each character at any position, and may insert 0 characters.) Given a list of queries, and a pattern, return…