Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/careercup/ctci
/ addNode
Method
addNode
java/Chapter 4/Question4_2/Graph.java:11–18 ·
view source on GitHub ↗
(Node x)
Source
from the content-addressed store, hash-verified
9
}
10
11
public
void
addNode(Node x) {
12
if
(count < 30) {
13
vertices[count] = x;
14
count++;
15
}
else
{
16
System.out.print(
"Graph full"
);
17
}
18
}
19
20
public
Node[] getNodes() {
21
return
vertices;
Callers
1
createNewGraph
Method · 0.95
Calls
1
print
Method · 0.45
Tested by
no test coverage detected