/data-structures-graph-starter

A starter project to implement graphs and graph-related functionality.

Primary LanguageJavaScript

Graph Project

This project contains a skeleton for you to implement some graph functionality. This is a test-driven project. Run the tests and read the top-most error. If it's not clear what is failing, open the test/test.js file to figure out what the test is expecting. Make the top-most test pass.

Keep making the top-most test pass until all tests pass.

Instructions

  • Clone the project from https://github.com/appacademy-starters/data-structures-graph-starter.
  • cd into the project folder
  • npm install to install dependencies in the project root directory
  • npm test to run the specs
  • You can view the test cases in test/test.js. Your job is to write code in
    • lib/breadth_first_search.js to implement the breadthFirstSearch function for graphs
    • lib/max_value.js to implement the maxValue function for graphs
    • lib/num_regions.js to implement the numRegions function for graphs
    • lib/leet_code_207.js to implement the canFinish function located at https://leetcode.com/problems/course-schedule/