If we want to become a full-stack developer we follow the following path :
First, we learn basic HTML & CSS, then we learn Javascript. Then...
For further actions, you may consider blocking this person and/or reporting abuse
Small issue: graph[from].add(to); should be .push (to) instead.
but also i am not getting same output as you for that portion of the function, can you specify the parameters you are calling with?
my graph variable shows
[ [ 2, 1 ], [], [ 3, 4 ], [ 6 ], [ 5, 6 ], [], [] ]
Omg thanks for pointing out, the graph is of another problem I am working on and I miss-matched it.
Graph is :[[2,0],[2,1],[3,2],[4,2],[4,5],[6,3],[6,4]]
I have updated the code :).
Thanks again for pointing out my mistake.
Thanks for publishing this, and maintaining it.
I think the e.g input in the article has a mistake:
[5,4],
should be[4,5],
Thanks for reading the article :), and updated my mistake.
Hi,
Above the second diagram, it is still not corrected
For eg : if give data is [[2,0],[2,1],[3,2],[4,2],[5,4],[6,3],[6,4]]
I cannot see where you corrected that but it is still wrong just above step 1.
For eg : if give data is [2,0],[2,1],[3,2],[4,2],[5,4],[6,3...
Nice explanation however i'd like to correct the following:
Being full-stack does not mean learning javascript. There are many ways to be full-stack; from .NET to PHP to Ruby to Python.
I would correct to:
Noted :)
Thank you for your article. You explained as well, however your implementation may have some problems. I didn't run your code but I guess that it will not be able to work as expected. For example:
int
visited
is Set, not Array, so you have to useadd()
, notpush()
Please check and fix them :)
Omg, thanks for pointing out! Code updated :)