MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / parent_idx

Method parent_idx

src/data_structures/heap.rs:158–164  ·  view source on GitHub ↗

Returns the index of the parent of the element at `idx`. # Parameters - `idx`: The index of the element. # Returns The index of the parent element if it exists, otherwise `None`.

(&self, idx: usize)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

heapify_upMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected