wycats (owner)

Revisions

gist: 210718 Download_button fork
public
Public Clone URL: git://gist.github.com/210718.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$ time ruby binarytree.rb 12
stretch tree of depth 13 check: -1
8192 trees of depth 4 check: -8192
2048 trees of depth 6 check: -2048
512 trees of depth 8 check: -512
128 trees of depth 10 check: -128
32 trees of depth 12 check: -32
long lived tree of depth 12 check: -1
 
real 0m2.241s
user 0m2.146s
sys 0m0.024s
 
 
$ time ruby19 binarytree.rb 12
stretch tree of depth 13 check: -1
8192 trees of depth 4 check: -8192
2048 trees of depth 6 check: -2048
512 trees of depth 8 check: -512
128 trees of depth 10 check: -128
32 trees of depth 12 check: -32
long lived tree of depth 12 check: -1
 
real 0m0.735s
user 0m0.545s
sys 0m0.020s
 
 
$ time bin/rbx binarytree.rb 12
stretch tree of depth 13 check: -1
8192 trees of depth 4 check: -8192
2048 trees of depth 6 check: -2048
512 trees of depth 8 check: -512
128 trees of depth 10 check: -128
32 trees of depth 12 check: -32
long lived tree of depth 12 check: -1
 
real 0m1.586s
user 0m1.310s
sys 0m0.097s