Greedy Use two pointers, one for source: i, one for target: j. While j scan through target, try to match each char of j in source by moving i. Count h ...
分类:
其他好文 时间:
2019-10-03 16:27:31
阅读次数:
107
111. Minimum Depth of Binary Tree Easy Easy Easy Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the short ...
分类:
其他好文 时间:
2019-10-02 17:02:53
阅读次数:
77
题目如下: In an n*n grid, there is a snake that spans 2 cells and starts moving from the top left corner at (0, 0)and (0, 1). The grid has empty cells rep ...
分类:
其他好文 时间:
2019-10-02 11:06:45
阅读次数:
89
1. 第一种方法导入sys模块; 2. 第二种方法,使用array模块,将整数用signed integer 4字节表示: | Type code C Type Minimum size in bytes | 'b' signed integer 1 | 'B' unsigned integer 1 ...
分类:
编程语言 时间:
2019-10-01 22:37:24
阅读次数:
385
spring模块 一,什么是依赖注入,什么是控制反转(IOC),在spring中有几种依赖注入的方式 控制反转(Inversion of Control,缩写为IoC),是面向对象编程中的一种设计原则,可以用来减低计算机代码之间的耦合度。 把由程序代码操控的对象的调用权交给容器,通过容器实现对象组件 ...
分类:
编程语言 时间:
2019-10-01 18:48:49
阅读次数:
124
1、标量(scalar)、向量(vector)、矩阵(matrix)、张量(tensor)。 2、一些关于矩阵的概念:主对角线(main diagonal)、单位矩阵(identity matrix)、逆矩阵(matrix inversion)、对角矩阵(diagonal matrix)、对称矩阵( ...
分类:
其他好文 时间:
2019-10-01 18:18:52
阅读次数:
112
1. The final uniform character should be either A[0] or B[0] 2. A[0] could be at the top, or the bottom. Same applies to B[0] 3. If A[0] works, no nee ...
分类:
其他好文 时间:
2019-10-01 16:12:21
阅读次数:
121
题目描述 Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need ...
分类:
其他好文 时间:
2019-09-30 23:35:43
阅读次数:
128
最近做的一个需求,当列表大概有2万条数据,又不让做成分页,如果页面直接渲染2万条数据,在一些低配电脑上可能会照成页面卡死,基于这个需求,我们来手写一个虚拟列表 思路 1. 列表中固定只显示少量的数据,比如60条 2. 在列表滚动的时候不断的去插入删除dom 3. startIndex、endInde ...
分类:
其他好文 时间:
2019-09-30 20:00:36
阅读次数:
99