YYZ-Engine / yyz-engine

A web app for users to test algorithms
MIT License
0 stars 0 forks source link

Linked List #47

Closed zpallin closed 6 years ago

zpallin commented 6 years ago

This one is not coming up in interviews as much, but it's important to know.

Create a singly linked list implementation in Javascript.

A linked list is a node map that links one node to the next node. This is a technique that is used to allow for a memory dynamic list in languages that do not have them, such as C (in C, arrays are the only native lists and they are static in size).

You will need to create a Node class that has the following "serialized" data structure:

#meta json
{
  "data": $someRandomString,
  "next": $nextNodeInTheLinkedList
}

You will want to implement the following functions for your Node class: