给定一个字符串 s,找到 s 中最长的回文子串。 public static String longestPalindrome(String s) { //最大长度 int max=0; //最大长度的回文中心 int mi=0; //加#避免漏虚轴 char[] chars = addf(s); ...
分类:
其他好文 时间:
2020-09-14 19:04:06
阅读次数:
39
#!/usr/bin/env python import os import numpy as np import py7zr import shutil import pandas as pd import time import multiprocessing import re def fun ...
分类:
系统相关 时间:
2020-09-09 19:20:50
阅读次数:
50
输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。 反转:从头到尾将链表打印到数组中,返回反转后的结果即可。 class Solution: def reversePrint(self, head): res = [] while head: res.append(head.val ...
分类:
其他好文 时间:
2020-09-07 19:13:25
阅读次数:
35
1 #获取某个文件夹下的所有代码总行数 2 import os 3 def GetAllPath(dirname): 4 result = [] 5 for maindir, subdir, file_name_list in os.walk(dirname): 6 for filename in ...
分类:
其他好文 时间:
2020-09-07 18:42:30
阅读次数:
44
Redis 1. 简介 Redis是由意大利人开发的一筐高速缓存数据库,是一个高性能的键值对(key-value)存储数据库, Redis全称Romote Dictianary Server(远程数据服务)使用C语言编写,并以内存作为数据库存储介质,所以读写的数据效率极高 redis运行在内核的读写 ...
分类:
其他好文 时间:
2020-08-24 16:54:52
阅读次数:
57
@(目录) 技术介绍 你好! python flask图片识别系统使用到的技术有:图片背景切割、图片格式转换(pdf转png)、图片模板匹配、图片区别标识。 运行效果 第一组: 图片1: 图片2: 开始上传: 上传成功、图片预览: (emmm..抱歉图片大小未处理,有点大哈) 识别效果: 成功了。。 ...
分类:
编程语言 时间:
2020-08-13 22:20:21
阅读次数:
92
import xlwt import openpyxl import xlrd def eq(l): workbook = xlrd.open_workbook('data.xlsx') table = workbook.sheet_by_index(0) all_data=[] url=[] te ...
分类:
其他好文 时间:
2020-08-13 12:34:19
阅读次数:
62
#include<stdio.h> #include<string> #include<string.h> #include<iostream> using namespace std; //compare比较函数:相等返回0,大于返回1,小于返回-1 int compare(string str1 ...
分类:
其他好文 时间:
2020-08-09 14:21:42
阅读次数:
81
分析:# 1、青蛙从1跳到X+1# 2、只有1到X的数字在某一个索引的位置填满的时候,取这个索引的值,如果一直取不到就返回Falsedef solution(X, A): B=[] K=-1 for i in A: B.append(i) K+=1 C=set(B) if len(C)==X: re ...
分类:
其他好文 时间:
2020-08-08 20:08:43
阅读次数:
78
语法及知识点:1.访问列表前n个元素,2.列表长度方法。3.用str()可以向字符串转化
4.列表中有字典,遍历列表中的字典
分类:
其他好文 时间:
2020-08-06 09:28:30
阅读次数:
78