Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6819776

Browse files
authored
Added make usage to binarytree and avltree
1 parent1b3b6ca commit6819776

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ tree = BinaryTree(BinaryTree(BinaryTree(None, None, 2),
109109
13),
110110
8)
111111
print tree,repr(tree),13in tree,3.14in tree,list(tree),iter(tree), tree.add(1).add(2).remove(3).remove(4)
112+
113+
for xin BinaryTree.make([1,2,3,-1,4,7,9,14,8,-23]):
114+
print x
112115
```
113116

114117
###Heap
@@ -128,6 +131,8 @@ print h1.add(1).pop(3).pop(4).add(20).head()
128131
from immutable.treesimport AVLTree
129132
tree= AVLTree(1,None,None)
130133
print2in tree.add(1).add(2).pop(4)
134+
for xin AVLTree.make([1,2,3,-1,4,7,9,14,8,-23]):
135+
print x
131136
```
132137

133138
 

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp