当前位置:网站首页>Force buckle 1961 Check whether the string is an array prefix
Force buckle 1961 Check whether the string is an array prefix
2022-07-07 20:06:00 【Tomorrowave】
1961. Check whether the string is an array prefix
Give you a string s And an array of strings words , Please judge s Is it words Of Prefix string .
character string s To be words Of Prefix string , Need to meet :s Can be words In front of k(k by Positive numbers ) Strings are concatenated in order to get , And k No more than words.length .
If s yes words Of Prefix string , return true ; otherwise , return false .
Code section
class Solution:
def isPrefixString(self, s: str, words: List[str]) -> bool:
b=''
for i in range(len(words)):
b+=words[i]
if b==s:
return True
return False
边栏推荐
- Mysql, sqlserver Oracle database connection mode
- JVM 类加载机制
- 831. KMP string
- R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize the violin diagram, set the palette parameter to customize the filling color of violin diagrams at different
- ASP. Net kindergarten chain management system source code
- 力扣 643. 子数组最大平均数 I
- Chapter 20 using work queue manager (3)
- 力扣 912.排序数组
- 力扣 88.合并两个有序数组
- 力扣 1037.有效的回旋镖
猜你喜欢
小试牛刀之NunJucks模板引擎
9 原子操作类之18罗汉增强
华南X99平台打鸡血教程
ASP. Net learning & ASP's one word
关于cv2.dnn.readNetFromONNX(path)就报ERROR during processing node with 3 inputs and 1 outputs的解决过程【独家发布】
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
mock. JS returns an array from the optional data in the object array
编译器优化那些事儿(4):归纳变量
BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
vulnhub之school 1
随机推荐
Boot 和 Cloud 的版本选型
R language dplyr package mutate_ At function and min_ The rank function calculates the sorting sequence number value and ranking value of the specified data column in the dataframe, and assigns the ra
一文读懂数仓中的pg_stat
How to cooperate among multiple threads
JVM class loading mechanism
PMP每日一练 | 考试不迷路-7.7
Ucloud is a basic cloud computing service provider
【STL】vector
Time tools
Ways to improve the utilization of openeuler resources 01: Introduction
IP tools
Sword finger offer II 013 Sum of two-dimensional submatrix
九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
Classification automatique des cellules de modules photovoltaïques par défaut dans les images de lecture électronique - notes de lecture de thèse
J ü rgen schmidhub reviews the 25th anniversary of LSTM papers: long short term memory All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversar
数据孤岛是企业数字化转型遇到的第一道险关
论文解读(ValidUtil)《Rethinking the Setting of Semi-supervised Learning on Graphs》
8 CAS
整型int的拼接和拆分
Some important knowledge of MySQL