MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / max

Method max

publication/code/chapter08/bst.rs:215–224  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

213 }
214
215 fn max(&self) -> (Option<&T>, Option<&U>) {
216 // 最大值一定在最右侧
217 match &self.right {
218 Some(node) => node.max(),
219 None => match &self.key {
220 Some(key) => (Some(&key), self.val.as_ref()),
221 None => (None, None),
222 },
223 }
224 }
225
226 // 获取左右子节点
227 fn get_left(&self) -> Link<T,U> {

Callers 3

radix_sortFunction · 0.45
counting_sortFunction · 0.45
basicFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected