MCPcopy Create free account
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / _toArray

Method _toArray

chapter02/util/LinkedListX.js:128–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 }
127
128 _toArray() {
129 let arr = [];
130 let cur = this.head;
131 while (cur) {
132 arr.push(cur.value);
133 cur = cur.next;
134 }
135
136 return arr;
137 }
138 }
139
140 module.exports = LinkedList;

Callers 1

removeDups.jsFile · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected