—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 选择排序算法 | |
* <https://visualgo.net/en/sorting> | |
*/ | |
let unsortedArray = [] | |
let i = 10 | |
while(i > 0) { | |
unsortedArray.push(Math.random() * 1000) | |
i-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unsortedArray = [], | |
count = 3000 | |
while (count > 0) { | |
unsortedArray.push(Math.random() * 1000) | |
count-- | |
} | |
let swapped = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unsortedArray = [], | |
count = 2000 | |
while (count > 0) { | |
unsortedArray.push(Math.random() * 1000) | |
count-- | |
} | |
console.log(unsortedArray) | |
console.time('insert osrt consume time') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unsortedArray = [] | |
let i = 10000 | |
while(i > 0) { | |
unsortedArray.push(Math.random() * 1000) | |
i-- | |
} | |
function mergeSort(array) { | |
let length = array.length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unsortedArray = [] | |
let i = 100000 | |
while(i > 0) { | |
unsortedArray.push(Math.random() * 1000) | |
i-- | |
} | |
function quickSort(array, left, right) { | |
let length = array.length |
First, we'll install a program to expose our local host to the Internet. We'll use ngrok to do this. ngrok is a free download available for all major operating systems.
When you're done with that, you can expose your localhost by running ./ngrok http 4567 on the command line. You should see a line that looks something like this:
Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 安装源 | |
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm | |
# 更新 或者是 install git | |
yum update git |
OlderNewer