from typing import List# 这道题不是很难,但是限制条件有很多。# 用递归的方法可以很容易的想到。只需要四层递归就好了。# 每次进行加上限制条件。过滤每一层就好了。、class Solution: def restoreIpAddresses(self, s: str) -> ...
分类:
其他好文 时间:
2020-08-09 13:07:19
阅读次数:
66
Leetcode.345 Reverse Vowels of a String Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hell ...
分类:
其他好文 时间:
2020-08-06 09:30:08
阅读次数:
64
创建UI脚本 #ifndef AA_H #define AA_H #include <QWidget> #include <QDebug> #include <QMutex> #include <QLabel> namespace Ui { class AA; } class AA : public ...
分类:
其他好文 时间:
2020-08-06 09:20:14
阅读次数:
58
import pickleclass Mypickle: def __init__(self,path): self.file = path def dump(self,obj): with open(self.file, 'ab') as f: pickle.dump(obj, f) def lo ...
分类:
其他好文 时间:
2020-08-05 16:54:47
阅读次数:
72
题目 给定一个 n × n 的二维矩阵表示一个图像。 将图像顺时针旋转 90 度。 思路 没有想到。看过解答后知道可以转置加翻转即可,且能达到最优的时间复杂度O(N^2)。 实现 class Solution: def rotate(self, matrix: List[List[int]]) -> ...
分类:
其他好文 时间:
2020-08-03 12:19:41
阅读次数:
82
bevol 平台爬取 import requests import time import os import openpyxl class Base_params: @property def headers(self): """ headers :return:headers """ retur ...
分类:
移动开发 时间:
2020-08-02 16:16:36
阅读次数:
130
1 class point: 2 row=0 3 col=0 4 def __init__(self,row,col): 5 self.row=row 6 self.col=col 7 def copy(self): 8 return point(row=self.row,col=self.col) ...
分类:
编程语言 时间:
2020-08-01 21:35:06
阅读次数:
113