We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0d5e1b9 + 56e2fc9 commit ea0fd54Copy full SHA for ea0fd54
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