Linear Data Structures Lab

Ada Developers Academy / Lovelace Learning Labs

Advanced Data Structures 1 - Trees

Week 1

Instructions

Download

$ git clone <paste-url>
$ cd <created-directory>

Install

$ npm install

Run tests in watch mode

$ npm test

Run local web server for visualizations (port 9000)

$ npm start

Assignment

Core

  1. Read through the code in array_queue.js and queue.test.js, and ensure you understand how and why it works
  2. Following the design suggested in the video lesson, implement the DoublyLinkedList class in doubly_linked_list.js to make the tests pass
  3. Use your DoublyLinkedList to implement the DLLQueue class to pass the tests in queue.test.js

Optional

  1. Write functions to serialize and deserialize a DLLQueue
    • How will you test your functions?
  2. Following the interface discussed in class, design and implement a Stack data structure using either an array or your DoublyLinkedList
    • Make sure it's well tested! You're welcome to use the queue tests as a starting point.