09 2021 档案

摘要:最长公共子序列:题解 阅读全文
posted @ 2021-09-25 10:55 xifang 阅读(20) 评论(0) 推荐(0)
摘要:leetcode:编写一个函数来查找字符串数组中的最长公共前缀。如果不存在公共前缀,返回空字符串 "" 点击查看代码 from typing import List class Solution: def longestCommonPrefix(self, strs: List[str]) -> s 阅读全文
posted @ 2021-09-24 22:28 xifang 阅读(217) 评论(0) 推荐(0)
摘要:如果两个列表等长 a=[1,2,3,4,5] b=['a','b','c','d','e'] c = [] for i,j in zip(a,b): c.append(str(j) + str(i)) list(map(lambda x,y:str(y)+str(x),a,b)) 如果两个列表不等长 阅读全文
posted @ 2021-09-23 21:05 xifang 阅读(283) 评论(0) 推荐(0)