Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx125
var assert = require('assert');class MyLinkedList { constructor() { this.head = null; this.tail = null; } prepend(value) { // prepend a value } append(value) { // append a value } toString() { // helper method const toPrint = []; let currNode = this.head; while (currNode) { toPrint.push(currNode.val); currNode = currNode.next; } return toPrint.join(' -> ');OUTPUT
Results will appear here.