From 2a2bb445194086a3b252e25875289083e0ca9b03 Mon Sep 17 00:00:00 2001
From: Kaj Koivunen <kalakoiv@jyu.fi>
Date: Mon, 13 Mar 2023 15:56:38 +0200
Subject: [PATCH] vanha debug-funktio pois

---
 src/main/kotlin/guru/kake/bst/BST.kt | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/src/main/kotlin/guru/kake/bst/BST.kt b/src/main/kotlin/guru/kake/bst/BST.kt
index 3d44566..dfa96a6 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
-- 
GitLab