Minor changes
This commit is contained in:
parent
59700d6bcc
commit
984f515fcb
1 changed files with 0 additions and 2 deletions
|
|
@ -35,11 +35,9 @@ func insert(t *Tree, v int) *Tree {
|
|||
if t == nil {
|
||||
return &Tree{nil, v, nil}
|
||||
}
|
||||
|
||||
if v == t.Value {
|
||||
return t
|
||||
}
|
||||
|
||||
if v < t.Value {
|
||||
t.Left = insert(t.Left, v)
|
||||
return t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue