eg:例如你调用了一个新增的接口,以往功能测试的话,你再web端新增一个店铺之后,你肯定要去数据库中查看,这些数据插入的对不对,是否正确的插入了每个字段 # 比较两个字典部分是否相等 def compare_two_dict(dict1, dict2, key_list): flag = True ...
分类:
编程语言 时间:
2020-02-28 15:47:19
阅读次数:
72
最多有两个不同字符的最长子串。题意是给一个字符串,请返回一个最长子串的长度。子串的要求是最多只有两个不同的字母。例子, Example 1: Input: "eceba" Output: 3 Explanation: tis "ece" which its length is 3. Example ...
分类:
其他好文 时间:
2020-02-28 13:52:03
阅读次数:
68
排序算法是非常常见也非常基础的算法,以至于大部分情况下它们都被集成到了语言的辅助库中。排序算法虽然已经可以很方便的使用,但是理解排序算法可以帮助我们找到解题的方向。1. 冒泡排序 (Bubble Sort)冒泡排序是最简单粗暴的排序方法之一。它的原理很简单,每次从左到右两两比较,把大的交换到后面,每... ...
分类:
编程语言 时间:
2020-02-28 12:26:51
阅读次数:
77
在幼儿园的时候,我们就学习过把一个数分成$a$与$b$,我们只需要用计算机来模拟这个过程就可以了。 我们先从奇数开始看起,以$5$为例: 我们可以发现,$5$可以分成$1$和$4$,$2$和$3$,$3$和$2$,以及$4$和$1$,也就是说,一个奇数可以有$n 1$种方法进行分解,去重后也就是$( ...
分类:
其他好文 时间:
2020-02-28 12:25:22
阅读次数:
66
You are given three integers a≤b≤ca≤b≤c . In one move, you can add +1+1 or ?1?1 to any of these integers (i.e. increase or decrease any number by one) ...
分类:
其他好文 时间:
2020-02-28 01:07:48
阅读次数:
85
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example... ...
分类:
其他好文 时间:
2020-02-27 11:41:45
阅读次数:
73
1 """ 2 Given a set of distinct integers, nums, return all possible subsets (the power set). 3 Note: The solution set must not contain duplicate subse ...
分类:
其他好文 时间:
2020-02-27 00:43:40
阅读次数:
73
专题二:基于色度的单幅图像镜面反射分量的分离——像素点的分类 一、像素点分类的标准 回忆一下双色反射模型如下: $$\mathbf{I\left ( p \right )} = m_{d}\left ( p \right )\mathbf{I_{d}\left ( p \right )}+m_{s} ...
分类:
其他好文 时间:
2020-02-26 22:29:23
阅读次数:
73
题目链接:https://leetcode-cn.com/problems/add-two-numbers/ 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表 ...
分类:
其他好文 时间:
2020-02-26 20:49:23
阅读次数:
57
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. at java.math.BigDecimal.divide(Unknown Source ...
分类:
编程语言 时间:
2020-02-26 18:42:55
阅读次数:
72