fn max(&self) -> Option<&K> {
        if self.is_empty() {
            return None;
        }
        let mut node = &self.root;
        loop {
            let next = &node[node.len() - 1].next;
            if !next.is_empty() {
                node = &next;
            } else {
                return Some(&node[node.len() - 1].key);
            }
        }
    }
/// Returns a optional reference to maximum key
///
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// use treers::btree::BalancedTree;
/// use treers::SedgewickMap;
///
/// let mut btree: BalancedTree<char, i32> = BalancedTree::new();
/// assert_eq!(btree.max(), None);
/// btree.put('c', 1);
/// btree.put('a', 2);
/// btree.put('b', 3);
/// btree.put('d', 4);
/// assert_eq!(btree.max(), Some(&'d'));
/// ```
Returns a optional reference to maximum key
Returns a optional reference to maximum key
fn max(&self) -> Option<&K> {
        if self.is_empty() {
            return None;
        }
        let mut node = &self.root;
        loop {
            let next = &node[node.len() - 1].next;
            if !next.is_empty() {
                node = &next;
            } else {
                return Some(&node[node.len() - 1].key);
            }
        }
    }
fn max ( & self ) -> Option < & K > { if self . is_empty ( ) { return None ; } let mut node = & self . root ; loop { let next = & node [ node . len ( ) - 1 ] . next ; if ! next . is_empty ( ) { node = & next ; } else { return Some ( & node [ node . len ( ) - 1 ] . key ) ; } } }
Returns a optional reference to maximum key
Returns a optional reference to maximum key
&self
&self
examples
Basic usage.

```
use treers::btree::BalancedTree;
use treers::SedgewickMap.


Basic usage . ` ` ` use treers :: btree :: BalancedTree ; use treers :: SedgewickMap .