nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: `all` generate manpages as `pandoc` is no more required
[nit.git]
/
tests
/
shootout_binarytrees.nit
diff --git
a/tests/shootout_binarytrees.nit
b/tests/shootout_binarytrees.nit
index
6ccd4be
..
5eea74f
100644
(file)
--- a/
tests/shootout_binarytrees.nit
+++ b/
tests/shootout_binarytrees.nit
@@
-20,9
+20,9
@@
# contributed by Jean Privat
class TreeNode
# contributed by Jean Privat
class TreeNode
- var _left: nullable TreeNode
- var _right: nullable TreeNode
- var _item: Int
+ var left: nullable TreeNode
+ var right: nullable TreeNode
+ var item: Int
init(left: nullable TreeNode, right: nullable TreeNode, item: Int)
init(left: nullable TreeNode, right: nullable TreeNode, item: Int)
@@
-75,7
+75,7
@@
var long_lived_tree = bottom_up_tree(0, max_depth)
var depth = min_depth
while depth <= max_depth do
var depth = min_depth
while depth <= max_depth do
- var iterations = 1.lshift(max_depth - depth + min_depth)
+ var iterations = 1 << (max_depth - depth + min_depth)
var check_res = 0
for i in [1..(iterations+1)[ do
var check_res = 0
for i in [1..(iterations+1)[ do