Closed jutkko closed 7 years ago
Because every node in binary tree is pointer in my implementation. You could implement it just by passing value (int, string, etc.). If you concern about manipulating the node before inserting, you can change your implementation to value :)
Hi I love this repo! I am going through it and I have a question to ask. Here https://github.com/gyuho/learn/blob/master/doc/binary_search_tree/code/00_insert.go#L62, why did you choose to make the insert function take a *Node? Since the pointer to the element can be changed, wouldn't this break the binary search tree?