Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-06-09 23:14:45
阅读次数:
264
clob字段存储的是文本,如果存储少于4000个字节则clob字段会和记录存放在一起,如果存储超过4000个字节,则不会与记录存放在一起。值得注意的是,这里的4000个字节并不是等同于varchar2(4000),那相当于什么呢,请看下列实验:
drop table test_clob purge;
create table test_clob
(
id number,
clob...
分类:
数据库 时间:
2014-06-08 17:00:32
阅读次数:
258
Find the contiguous subarray within an array (containing at least one number) which has the largest sum....
分类:
其他好文 时间:
2014-06-08 15:54:08
阅读次数:
258
本题有两个考点:
1 求逆序数的性质
计算逆序数的公式, 一个数arr[i]从前面放到后面,必然会有n-arr[i]-1个数比这个大,那么就有n-arr[i]-1个逆序数增加,同时因为前面少了个arr[i]数,那么就必然有arr[i]个(加上零)数比起小的数失去一个逆序数,总共失去arr[i]个逆序数,所以新的逆序数为增加了n-arr[i]-1-arr[i]个逆序数(当然有可能是减小了,视ar...
分类:
其他好文 时间:
2014-06-08 15:52:20
阅读次数:
275
建表前如何判断表是否存在呢,因为table是不支持replace的。下面的sql能帮到你。create前先判断表是否存在。例如,如果存在则drop掉那个表。当然你也可以定义自己的操作。 declare
v_cnt Number;
begin
select count(*) into v_cnt from user_tables where upper(table_name) ...
分类:
数据库 时间:
2014-06-08 15:42:00
阅读次数:
329
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-06-08 15:30:28
阅读次数:
227
题目
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string by deleting some (can be...
分类:
其他好文 时间:
2014-06-08 14:49:14
阅读次数:
347
操作blob字段是否会产生大量redo,答案是不会,下面来做一个实验,测试数据库版本是11.2.0.1.0:
--创建一张表做测试之用
create table test_blob
(
id number,
tupian blob
);
import java.io.FileInputStream;
import java.io.OutputStream;
import ja...
分类:
数据库 时间:
2014-06-08 10:41:29
阅读次数:
399
Problem Description
Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:
1. Emergenc...
分类:
其他好文 时间:
2014-06-08 10:31:22
阅读次数:
234
Oralce升级过程中,执行SQL> @?/rdbms/admin/catupgrd.sql脚本时,
遇到ORA-01722: invalid number报错,
导致报错的语句是 SELECT TO_NUMBER('DATA_VAULT_OPTION_ON') FROM v$option。
解决方法: 关闭Oracle Database Vault功能。...
分类:
数据库 时间:
2014-06-08 09:08:07
阅读次数:
251