1. doctype的作用是什么? <!DOCTYPE> 声明必须是 HTML 文档的第一行,位于 <html> 标签之前。 <!DOCTYPE> 声明不是 HTML 标签;它是指示 web 浏览器关于页面使用哪个 HTML 版本进行编写的指令。 在 HTML 4.01 中有三种 <!DOCTYPE ...
分类:
Web程序 时间:
2019-10-04 11:38:20
阅读次数:
107
1.RMQ问题 RMQ (Range Minimum/Maximum Query):对于长度为n的数组A,回答若干询问RMQ(A,i,j)(i,j<=n-1),返回数组A中下标在i,j范围内的最小(大)值,也就是说,RMQ问题是指求区间最值的问题。最简单的方法,就是遍历数组直接搜索,但是这种方式时间 ...
分类:
其他好文 时间:
2019-10-04 11:37:06
阅读次数:
117
You are given two arrays aa and bb, both of length nn. All elements of both arrays are from 00 to n?1n?1. You can reorder elements of the array bb (if ...
分类:
其他好文 时间:
2019-10-04 00:15:16
阅读次数:
79
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
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