Array(数组)是JavaScript中较为复杂的数据类型,同Java、C#、VB等程序语言的数组相比,Javascript数组中的元素不必为相同的数据类型,可以在数组每个元素上混合使用数字、日期、字符串、Object,甚至添加一个嵌套数组。...
分类:
编程语言 时间:
2014-06-20 10:15:11
阅读次数:
297
Find the contiguous subarray within an array
(containing at least one number) which has the largest sum.For example, given
the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2014-06-20 08:59:38
阅读次数:
235
Given an array where elements are sorted in
ascending order, convert it to a height balanced BST./** * Definition for binary
tree * public class TreeN...
分类:
其他好文 时间:
2014-06-11 21:58:10
阅读次数:
300
1.1Implement an algorithm to determine if a
string has all unique characters. What if you cannot use additional data
structures?字符串问题,需要先确定是不是只有ASCII码...
分类:
其他好文 时间:
2014-06-11 12:27:53
阅读次数:
247
原题地址:https://oj.leetcode.com/problems/search-insert-position/题意:Given
a sorted array and a target value, return the index if the target is found. If
n...
分类:
编程语言 时间:
2014-06-11 11:28:40
阅读次数:
349
原题地址:https://oj.leetcode.com/problems/plus-one/题意:Given
a non-negative number represented as an array of digits, plus one to the
number.The digits are...
分类:
编程语言 时间:
2014-06-11 11:25:27
阅读次数:
304
又2b了一次…… 1 var s:ansistring; 2
ans,pre:array[0..10000] of longint; 3 i,k,tot:longint; 4 procedure main; 5 begin
6 pre[1]:=0;k:=0; 7 for i:=...
分类:
其他好文 时间:
2014-06-11 08:42:01
阅读次数:
211
脑残wa了一次 1 var s:ansistring; 2
ans,i,k,m:longint; 3 pre:array[0..1010000] of longint; 4 function
max(x,y:longint):longint; 5 begin 6 if x>...
分类:
其他好文 时间:
2014-06-11 08:30:14
阅读次数:
179
关于结构体的一个特殊用法
//写法一
struct array {
int count;
char *buf;
}
//写法二
struct array {
int count;
char buf[0];
}
如果一个buf用作一个buffer的话,这时候如果malloc一块内存,
用方法一,buf是指针的话,指向这块申请出的内存的话,这里arr...
分类:
其他好文 时间:
2014-06-07 12:13:20
阅读次数:
273
在vm下redhat5下安装oracle 11g后,登录sqlplus 报:
sqlplus: error while loading shared libraries: /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: cannot restore segment prot after reloc:...
分类:
数据库 时间:
2014-06-07 12:00:29
阅读次数:
303