We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3849a1d commit 56e2fc9Copy full SHA for 56e2fc9
Binary Search Tree/Solution 1/BinarySearchTree.playground/Sources/BinarySearchTree.swift
@@ -235,7 +235,7 @@ extension BinarySearchTree {
235
/*
236
Finds the node whose value precedes our value in sorted order.
237
*/
238
- public func predecessor() -> BinarySearchTree<T>? {
+ public func predecessor() -> BinarySearchTree? {
239
if let left = left {
240
return left.maximum()
241
} else {
@@ -251,7 +251,7 @@ extension BinarySearchTree {
251
252
Finds the node whose value succeeds our value in sorted order.
253
254
- public func successor() -> BinarySearchTree<T>? {
+ public func successor() -> BinarySearchTree? {
255
if let right = right {
256
return right.minimum()
257
0 commit comments