Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 425 Bytes

File metadata and controls

27 lines (21 loc) · 425 Bytes

Binary search tree

Instructions

Implement binary search tree (BST).

challenge | solution

Examples

//----------Tree------------
//
//           6
//         /   \
//        3     8
//       /
//      1   
//
//--------------------------

val bst = BinarySearchTree<Int>()
bst.add(6)
bst.add(3)
bst.add(1)
bst.add(8)