File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,8 @@ function Base.delete!(tree::SplayTree{K}, d::K) where K
178
178
return tree
179
179
end
180
180
181
- function Base. insert! (tree:: SplayTree{K} , d:: K ) where K
181
+ function Base. push! (tree:: SplayTree{K} , d0) where K
182
+ d = convert (K, d0)
182
183
is_present = search_node (tree, d)
183
184
if (is_present != = nothing ) && (is_present. data == d)
184
185
return tree
@@ -210,11 +211,6 @@ function Base.insert!(tree::SplayTree{K}, d::K) where K
210
211
return tree
211
212
end
212
213
213
- function Base. push! (tree:: SplayTree{K} , key0) where K
214
- key = convert (K, key0)
215
- insert! (tree, key)
216
- end
217
-
218
214
function Base. getindex (tree:: SplayTree{K} , ind) where K
219
215
@boundscheck (1 <= ind <= tree. count) || throw (KeyError (" $ind should be in between 1 and $(tree. count) " ))
220
216
function traverse_tree_inorder (node:: Union{SplayTreeNode, Nothing} )
You can’t perform that action at this time.
0 commit comments