MCPcopy Create free account
hub / github.com/MolinDeng/Princeton-algs4 / put

Method put

09Lab-Boggle/BoggleSolver.java:33–40  ·  view source on GitHub ↗
(Node x, String key)

Source from the content-addressed store, hash-verified

31 }
32
33 private void put(Node x, String key) {
34 for (char c : key.toCharArray()) {
35 if (x.children[c - 'A'] == null)
36 x.children[c - 'A'] = new Node();
37 x = x.children[c - 'A'];
38 }
39 x.isTernimal = true;
40 }
41
42 private boolean get(Node x, String key) {
43 for (char c : key.toCharArray()) {

Callers 1

BoggleSolverMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected