I recently implemented Treap, one of various kinds of binary search trees (BSTs), on Rust. It is a balanced BST, which means that it ensures that tree depth is always O(log(n)) where n = (the number of items in a tree). That is achieved by using randomness. (For more details see Wikipedia.)