xlhuang's recent timeline updates
xlhuang

xlhuang

V2EX member #45495, joined on 2013-09-16 13:41:56 +08:00
xlhuang's recent replies
Jun 23, 2019
Replied to a topic by zhiguang 程序员 请推荐一些适合程序员的书籍
好贴好贴,我也来一本:大型网站技术架构
Sep 25, 2013
Replied to a topic by coffeego Node.js nodejs适合做SNS这些网站吗?
啊,一直用mysql……
Sep 25, 2013
Replied to a topic by clino JavaScript 有人关注 avalon 这个 MVVM 框架吗?
其实我也非常关注性能……
Sep 22, 2013
Replied to a topic by nilai PHP 北京招聘PHP程序员一枚
报个名,QQ862802759
Sep 20, 2013
Replied to a topic by 00 程序员 关于写代码时戴手套
我了个去……不怕按错么?
Sep 20, 2013
Replied to a topic by itfanr 程序员 如何输出一个数组的全排列?
Sep 20, 2013
Replied to a topic by itfanr 程序员 如何输出一个数组的全排列?
<code>
<pre>
var result = [];
function permutation1(arr) {
perm1(arr, 0);
}
function perm1(arr, index) {
var n = arr.length;
if (index === n - 1) {
result.push(arr.slice());
return false;
} else {
for (j = index; j < n; ++j) {
swap(arr, j, index);
arguments.callee(arr, j + 1);
swap(arr, j, index);
}
}
}
function swap(arr, index1, index2) {
var temp = arr[index1];
arr[index1] = arr[index2];
arr[index2] = temp;
}
</pre>
</code>
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1376 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 17:13 · PVG 01:13 · LAX 10:13 · JFK 13:13
♥ Do have faith in what you're doing.