MCPcopy Create free account
hub / github.com/careercup/ctci / getTail

Method getTail

java/Chapter 17/Question17_13/QuestionB.java:24–33  ·  view source on GitHub ↗
(BiNode node)

Source from the content-addressed store, hash-verified

22 }
23
24 public static BiNode getTail(BiNode node) {
25 if (node == null) {
26 return null;
27 }
28 while (node.node2 != null) {
29 count++;
30 node = node.node2;
31 }
32 return node;
33 }
34
35 public static void concat(BiNode x, BiNode y) {
36 x.node2 = y;

Callers 1

convertMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected