Skip to content

Commit ea0fd54

Browse files
authored
Merge pull request #867 from bbvch13531/patch865-2
Change return type to brief type.
2 parents 0d5e1b9 + 56e2fc9 commit ea0fd54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Binary Search Tree/Solution 1/BinarySearchTree.playground/Sources/BinarySearchTree.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ extension BinarySearchTree {
235235
/*
236236
Finds the node whose value precedes our value in sorted order.
237237
*/
238-
public func predecessor() -> BinarySearchTree<T>? {
238+
public func predecessor() -> BinarySearchTree? {
239239
if let left = left {
240240
return left.maximum()
241241
} else {
@@ -251,7 +251,7 @@ extension BinarySearchTree {
251251
/*
252252
Finds the node whose value succeeds our value in sorted order.
253253
*/
254-
public func successor() -> BinarySearchTree<T>? {
254+
public func successor() -> BinarySearchTree? {
255255
if let right = right {
256256
return right.minimum()
257257
} else {

0 commit comments

Comments
 (0)