Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/kunal-kushwaha/DSA-Bootcamp-Java
/ insert
Method
insert
lectures/24-heaps/code/heaps-1/Heap.java:29–32 ·
view source on GitHub ↗
(T value)
Source
from the content-addressed store, hash-verified
27
}
28
29
public
void
insert(T value) {
30
list.add(value);
31
upheap(list.size() - 1);
32
}
33
private
void
upheap(
int
index) {
34
if
(index == 0) {
35
return
;
Callers
1
main
Method · 0.95
Calls
3
upheap
Method · 0.95
add
Method · 0.45
size
Method · 0.45
Tested by
no test coverage detected