上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: 题目:Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return ... 阅读全文
posted @ 2016-01-08 22:14 很好玩 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]re... 阅读全文
posted @ 2016-01-08 21:49 很好玩 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目:iven an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptnums[i].So... 阅读全文
posted @ 2016-01-08 21:16 很好玩 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 规范中明确写道:Equal to the computed value of ‘font-size’ on the root element.rem是指根元素(root element,html)的字体大小,从 IE6 到Chrome,根元素都默认的 font-size 都是 16px。下面来看看r... 阅读全文
posted @ 2016-01-08 16:48 很好玩 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not poss... 阅读全文
posted @ 2016-01-07 22:48 很好玩 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 题目:Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted arraynums=[1,1,1,2,2,3],Your function should... 阅读全文
posted @ 2016-01-07 22:01 很好玩 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 题目:You are given annxn2D matrix representing an image.Rotate the image by 90 degrees (clockwise).思路:方法一:可以见矩阵看成多个环组成,如下4*4的矩阵包括两个环,第一个环为1,2,3,4,8,12,1... 阅读全文
posted @ 2016-01-07 21:51 很好玩 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted fro... 阅读全文
posted @ 2016-01-07 17:19 很好玩 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ... 阅读全文
posted @ 2016-01-07 16:30 很好玩 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in... 阅读全文
posted @ 2016-01-07 16:08 很好玩 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目:Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?... 阅读全文
posted @ 2016-01-07 11:31 很好玩 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red,... 阅读全文
posted @ 2016-01-06 23:39 很好玩 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 1.attachEvent与addEventListener的区别支持的浏览器不同。attachEvent在IE9以下的版本中受到支持。其它的都支持addEventListener。参数不同。addEventListener第三个参数可以指定是否捕获,而attachEvent不支持捕获。事件名不同。... 阅读全文
posted @ 2016-01-06 14:40 很好玩 阅读(5780) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following ma... 阅读全文
posted @ 2016-01-05 22:40 很好玩 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3... 阅读全文
posted @ 2016-01-05 22:29 很好玩 阅读(215) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页