Created with CodeSandbox

Overview

Complete Intro to Computer Science: Algorithms and Data Structures


As taught by Brian Holt for Frontend Masters

Learn computer science with Brian Holt!

PRs

If you have any issues with this repo, please file the issues with the main repo here. Feel free to open PRs for mistakes in this repo though.

License

The code is this repo is licensed under the Apache 2.0 license.

The content is this repo is licensed under the CC-BY-NC-4.0 license.

Comments
  • Fix babel core update error

    Fix babel core update error

    Was getting an error on start:

    @JackHowa ➜ /workspaces/algorithms-exercises (main) $ npm start
    
    > [email protected] start /workspaces/algorithms-exercises
    > parcel index.html
    
    ℹ️ Server running at http://localhost:1234
    🚨 Build failed.
    @parcel/transformer-babel: babelCore(...).loadPartialConfigAsync is not a function
    TypeError: babelCore(...).loadPartialConfigAsync is not a function
        at load (/workspaces/algorithms-exercises/node_modules/@parcel/transformer-babel/lib/config.js:115:41)
        at loadConfig (/workspaces/algorithms-exercises/node_modules/@parcel/transformer-babel/lib/BabelTransformer.js:66:30)
        at Transformation.loadTransformerConfig (/workspaces/algorithms-exercises/node_modules/@parcel/core/lib/Transformation.js:741:13)
        at Transformation.loadPipeline (/workspaces/algorithms-exercises/node_modules/@parcel/core/lib/Transformation.js:679:31)
        at async Transformation.loadNextPipeline (/workspaces/algorithms-exercises/node_modules/@parcel/core/lib/Transformation.js:717:24)
        at async Transformation.runPipelines (/workspaces/algorithms-exercises/node_modules/@parcel/core/lib/Transformation.js:434:24)
        at async Transformation.run (/workspaces/algorithms-exercises/node_modules/@parcel/core/lib/Transformation.js:316:19)
        at async Child.handleRequest (/workspaces/algorithms-exercises/node_modules/@parcel/workers/lib/child.js:255:9)
    
    

    Noticed a peer dependency needed updating via npm i

    npm WARN @parcel/[email protected] requires a peer of @babel/core@^7.12.0 but none is installed. You must install peer dependencies yourself.
    npm WARN @parcel/[email protected] requires a peer of @babel/core@^7.12.0 but none is installed. You must install peer dependencies yourself.
    
    opened by JackHowa 2
  • Fix rotateLL/rotateRR mix-up

    Fix rotateLL/rotateRR mix-up

    In the case of right-heavy balancing, left rotation is always the last rotation performed (the only one if it's not a double rotation). A right rotation is performed for a left-heavy tree. The rotateLL method actually performs a right rotation and vice versa. Swapped the names.

    opened by ghost 0
  • Fix bug in radix sort test case

    Fix bug in radix sort test case

    The second test fails if the radix sort algorithm is implemented correctly, because it uses Array.prototype.sort(), the default behavior of which is to treat input as strings. A compare function must be supplied to sort numbers correctly.

    opened by ghost 0
  • Minor problem with tests

    Minor problem with tests

    Hey, there are a few test files which aren't structured properly - when the repo is cloned and npm run test is run there are files for which jest complains: “Tests cannot be nested”. I'll submit a PR to fix this.

    opened by x4th 0
  • Bug with pathfinding solution

    Bug with pathfinding solution

    I think there is a bug with the pathfinding solution where it doesn't get neighbors correctly when the grid isn't square. https://github.com/btholt/algorithms-exercises/blob/5b2edb0bc08e033d552ea7f9c891d02b49863aa0/specs/pathfinding/pathfinding.solution.test.js#L77

    if (y - 1 >= 0 && !visited[y - 1][x].closed) { is up and ln 85 if (y + 1 < visited[0].length && !visited[y + 1][x].closed) { is down. Since we move up and down ln 85 should check visited.length not visited[0].length else it can run out of bounds with non square (rectangular) grids. Conversely ln 95 should be flipped to check visited[0].length since that is left and right and the nested arrays represent Xs max size.

    I'm enjoying the course. Thanks!

    opened by kevinbror 0
  • Tests cannot be nested, jest complaninig locally

    Tests cannot be nested, jest complaninig locally

    https://github.com/btholt/algorithms-exercises/blob/5b2edb0bc08e033d552ea7f9c891d02b49863aa0/specs/graph/graph.test.js#L34

    I do receive this error message when trying to run the tests locally.

    FAIL specs/graph/graph.test.js ● extra credit

     Tests cannot be nested. Test "user 1 with 7 degrees of separation – this will traverse every user that's followed by someone else. five users are unfollowed" cannot run because it is nested within "extra credit".
    
      73 |
      74 | test("extra credit", function () {
    > 75 |   test("user 1 with 7 degrees of separation – this will traverse every user that's followed by someone else. five users are unfollowed", () => {
         |   ^
      76 |     expect(findMostCommonTitle(1, 7)).toBe("Geological Engineer");
      77 |   });
      78 | });
    
      at Env.it (node_modules/jest-jasmine2/build/jasmine/Env.js:605:19)
      at Object.<anonymous> (specs/graph/graph.test.js:75:3)`
    

    I had to change the outer test to describe

    opened by muzhaqi16 0
  • Sort Visualizer (Codesanbox version) isn´t working

    Sort Visualizer (Codesanbox version) isn´t working

    Hi I think the version of the viewer in codesanbox is not working. I compared the version in this repository with the version in Codesanbox and some files are missing.

    I tried running the files on my machine locally and they work correctly, but the Codesanbox version only prints the word Hi.

    image image

    sorry if this issue doesn't go here, I didn't know where to report it.

    opened by LuisAndrino 0
Owner
Brian Holt
principal program manager on Node.js on Azure and Visual Studio Code; formerly at @Netflix, @linkedin, and @reddit; teacher on @FrontendMasters
Brian Holt
Created with StackBlitz ⚡️

electron-quick-start Clone and run for a quick way to see Electron in action. This is a minimal Electron application based on the Quick Start Guide wi

hmmhmmhm 2 Oct 12, 2021
♦ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS.

Crowdcoin ♦ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS. Project from "Ethereum and Solidity: T

Luiz Fernando Veríssimo 2 Dec 14, 2022
created a very simple blockchain. just for fun.

SimpleBlockChain created a very simple blockchain. just for fun. Run: node main.js What happens? basically we create a new blockchain, and later we ad

null 1 Dec 25, 2021
PizzaFace - My second application created with KABOOMJS and Javascript

PizzaFace - My second application created with KABOOMJS and Javascript

Crifology 1 Jan 5, 2022
🦆 The repository for dealing with all the ducks created and managed by the Fairfield Programming Association.

Download Since the Fairfield Programming Association's duck generator is built on top of node.js and npm, you need to have both of those installed as

Fairfield Programming Association 15 Feb 4, 2022
A hub of all Marvel comics featuring your favorite heroes created with NextJS.

A hub of all Marvel comics featuring your favorite heroes created with NextJS. marvel-hub.vercel.app Stack Front-end: NextJs, Jest, Styled Components

Felipe Barcelos 28 May 1, 2022
This branch is created to make receive and send data to api using async and await methods

Microverse-Leader-Board Project from module 2 week 4 This branch is created to make receive and send data to api using async and await methods Screens

Akshitha Reddy 6 Apr 22, 2022
Code Playground is a online application for testing and showcasing user-created and collaborational HTML, CSS and JavaScript code snippets

Code Playground About Code Playground is a online application for testing and showcasing user-created and collaborational HTML, CSS and JavaScript cod

Arshansh Agarwal 5 Dec 17, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
Obsidian-dataview-table-filter-menu - Dynamically created filter menu for dataview tables in obsidian

Dataview table Filter Menu for Obsidian Dynamically created filter menu for data

shiro 17 Sep 24, 2022
Frontend that instantiate custom apps created using toguro-cli

Toguro FE This project contains the frontend for the main Toguro platform using Matrix Js SDK It includes the built .es.js of Mx-Login-App for referen

Hugo Leonardo Simas Mendes 4 Feb 24, 2022
Library for Foundry VTT which provides easy access to dark comedy fantasy setting created by Richard Zadmar Woolcock

Library for Foundry VTT which provides easy access to dark comedy fantasy setting created by Richard Zadmar Woolcock. Current inclusions are a bestiary, edges, hindrances, and a journal with setting information, character creation, and more. The Savage Worlds Adventurers Edition Game System is the system this setting is designed for.

KevDog 2 Mar 18, 2022
A NodeJs service which allows you to create a movie based on it's title (additional movie details will be fetched) and fetch all created movies.

movies-api A NodeJs service which allows you to create a movie based on it's title (additional movie details will be fetched) and fetch all created mo

Ugochukwu Ejiogu 2 Mar 27, 2022
The /r/place Atlas is a project aiming to catalog all the artworks created during Reddit's 2022 /r/place event.

The 2022 Place Atlas The /r/place Atlas is a project aiming to catalog all the artworks created during Reddit's 2022 /r/place event. This project was

Place Atlas 397 Dec 28, 2022
cis-scheduler-team-26 created by GitHub Classroom

React TypeScript Starter Repo Hello! This repository has been pre-configured with eslint and gh-pages to automatically deploy your app when you push t

UD CISC275 Spring 2022 1 Sep 4, 2022
A simple to-do list created while a student in Microverse using JavaScript to add and delete selected tasks.

To-Do List This is a simple To-Do list page I made following the requirements from Microverse. You can check it out here: https://thi-ponce.github.io/

Thiago Ponce 7 Nov 28, 2022
Keep a track of all the tasks you need to do and Check off ones you have completed - Created using HTML, SCSS, JavaScript and Webpack.

To Do List Keep a track of tasks you need to do. An Application where you can keep a track of the tasks you need to do and checkout the ones that have

Awais Amjed 19 Jul 28, 2022