MCPcopy
hub / github.com/careercup/ctci / search

Method search

java/Chapter 18/Question18_8/SuffixTreeNode.java:29–40  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

27 }
28
29 public ArrayList<Integer> search(String s) {
30 if (s == null || s.length() == 0) {
31 return indexes;
32 } else {
33 char first = s.charAt(0);
34 if (children.containsKey(first)) {
35 String remainder = s.substring(1);
36 return children.get(first).search(remainder);
37 }
38 }
39 return null;
40 }
41}
42

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected