题目
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only const...
分类:
其他好文 时间:
2014-06-18 11:53:39
阅读次数:
138
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2014-06-18 11:41:52
阅读次数:
156
ocp 053688. Which two statements are true about the compressed backups in RMAN? (Choose two.)A.Compressed backups can only be taken on the tape drives...
分类:
其他好文 时间:
2014-06-18 11:06:25
阅读次数:
303
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 nu...
分类:
其他好文 时间:
2014-06-18 10:17:40
阅读次数:
174
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 ...
分类:
其他好文 时间:
2014-06-17 23:38:04
阅读次数:
341
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
0). Fin...
分类:
其他好文 时间:
2014-06-17 22:17:43
阅读次数:
325
motorola scanner datasheet相关解释(以下通过Simple Serial Interface(SSI)进行设置,非扫描官方datasheet的设置条码):
One Discrete Length:一个单独的条码长度,就是扫描头设置以后,只支持指定的一个长度的条码,发送格式:指定的条码长度作为长度参数1的值,长度参数2的值设置为0x00即可(比如设置interlea...
分类:
移动开发 时间:
2014-06-17 19:33:52
阅读次数:
296
初识泛型算法
理解算法的最基本方法是了解他们是否读取元素、改变元素或是重排元素顺序!
只读算法
#include
#include
using namespace std;
//对vec中的元素求和,初值是0
int sum=accumulate(vec.cbegin(), vec.cend(), 0);
这里面第三个参数决定了函数使用哪个加法运算符以及返回值类型。
...
分类:
编程语言 时间:
2014-06-17 19:12:26
阅读次数:
261
??
First, a
dependency is a semantic relationship between two model elements in which a change to one element
(the independent one) may affect the semantics of the other element (the dependent on...
分类:
其他好文 时间:
2014-06-17 18:50:36
阅读次数:
182
#100以内整数和
#!/bin/sh
declare-iSUM=0
for((i=1;i<=100;i+=1))
do
letSUM+=$i
done
echo$SUM
#!/bin/sh
declare-iSUM=0
foriin{1..100}
do
letSUM+=$i
done
echo$SUM
#100以内偶数和
#!/bin/sh
declare-iSUM=0
for((i=2;i<=100;i+=2))
do
letSUM+=$i
done
echo$SUM..
分类:
其他好文 时间:
2014-06-17 17:46:32
阅读次数:
232