btholt / algorithms-exercises Goto Github PK
View Code? Open in Web Editor NEWCreated with CodeSandbox
Home Page: https://codesandbox.io/s/github/btholt/algorithms-exercises
Created with CodeSandbox
Home Page: https://codesandbox.io/s/github/btholt/algorithms-exercises
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
I think there is a bug with the pathfinding solution where it doesn't get neighbors correctly when the grid isn't square.
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!
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.
sorry if this issue doesn't go here, I didn't know where to report it.
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.
12.18.3
Linux and Windows PC
I'm trying to run the code locally and there seems to be a build failure when I run npm run start
(this is after I did an npm install
):
🚨 Build failed.
@parcel/transformer-babel: babelCore(...).loadPartialConfigAsync is not a function
And the site cannot be reached.
Digging into this it looks like it is something missing in babel core which is currently using version 7.2.0. So I tired bumping the babel version to 7.14.0 and the problem went away. I can do a pull request if that helps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.