MCPcopy Index your code
hub / github.com/careercup/CtCI-6th-Edition-JavaScript / _toArray

Method _toArray

chapter03/util/LinkedList.js:115–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 }
114
115 _toArray() {
116 let arr = [];
117 let cur = this.head;
118 while (cur) {
119 arr.push(cur.value);
120 cur = cur.next;
121 }
122
123 return arr;
124 }
125}
126
127module.exports = LinkedList;

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected