Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s
分类:
其他好文 时间:
2016-03-05 20:21:26
阅读次数:
135
1、hasOwnProperty:看是不是对象自身下面的属性 var arr = []; arr.num = 10; Array.prototype.num2 = 20; //所有的数组对象都有num2,并不只是arr自身的属性 //alert( arr.hasOwnProperty('num')
分类:
其他好文 时间:
2016-03-05 16:15:31
阅读次数:
246
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target va
分类:
其他好文 时间:
2016-03-05 16:11:18
阅读次数:
171
You’re given k arrays, each array has k integers. There are k
k ways to pick exactly one element in each
array and calculate the sum of the integers. Your task is to find the k smallest sums among them....
分类:
其他好文 时间:
2016-03-05 14:48:36
阅读次数:
134
转载请注明出处:z_zhaojun的博客
原文地址
题目地址
Product of Array Except SelfGiven an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of...
分类:
编程语言 时间:
2016-03-05 14:48:34
阅读次数:
370
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room
分类:
其他好文 时间:
2016-03-05 14:29:31
阅读次数:
284
Given a rotated sorted array, recover it to sorted array in-place. [4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5] 方法挺诡异的,记住就好: 找到分界点,把左半边反转,把右半边反转,这时候整个数组就是从大到小排列
分类:
其他好文 时间:
2016-03-05 08:00:10
阅读次数:
159
学了好多不了解的知识: procedure TForm1.Button1Click(Sender: TObject); var s1 : String; s2 : String[255]; begin s1:='ç1很好'; ShowMessage(s1); // 这里显示正常 s2:=s1; Sh
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo
分类:
其他好文 时间:
2016-03-04 22:20:50
阅读次数:
221
题目:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.翻译:
给定一个非负数,它是有数字的数组组成,...
分类:
其他好文 时间:
2016-03-04 17:48:32
阅读次数:
126