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

Method from_vec

src/data_structures/heap.rs:45–49  ·  view source on GitHub ↗

Creates a heap from a vector and a custom comparator function. # Parameters - `items`: A vector of items to be turned into a heap. - `comparator`: A function that defines the heap's ordering. # Returns A `Heap` instance with the elements from the provided vector.

(items: Vec<T>, comparator: fn(&T, &T) -> bool)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

build_heapMethod · 0.80

Tested by

no test coverage detected