diff --git a/src/main/kotlin/guru/kake/bst/BST.kt b/src/main/kotlin/guru/kake/bst/BST.kt index 3d4456658516858022ecd4dc003f60304cf2900e..dfa96a67f9cf14bfc4d7803214e52924305ebd00 100644 --- a/src/main/kotlin/guru/kake/bst/BST.kt +++ b/src/main/kotlin/guru/kake/bst/BST.kt @@ -50,34 +50,6 @@ class BST<T : Comparable<T>>(list: List<T>) { } } - /** - * Debug function for finding a node - * @param value Node to find - * @return list of all nodes along the way to [value] - */ - @Deprecated(message = "Will not be part of the final API") - fun debugFind(value: T): List<T?> { - val list = mutableListOf<T>() - var node = root - - while (true) { - if (node!=null) { - println("node: ${node.value}, left: ${node.left?.value}, right: ${node.right?.value}") - list.add(node.value) - if (node.value < value) { - node = node.right - continue - } - else if (node.value > value) { - node = node.left - continue - } - } - break - } - return list.toList() - } - /** * Node of the binary search tree * @param T contained type