Conversation
Woomin-Jeon
left a comment
There was a problem hiding this comment.
테스트 케이스도 엄청 꼼꼼히 짜셨네요! 정말 고민의 흔적이 많이 보이는 코드였습니다. 잘봤습니다!
자료구조/Graph/daadaadaah/graph.test.js
Outdated
There was a problem hiding this comment.
adjust는 동사라서 adjustedNodes 처럼 명사 변수를 사용하시는 건 어떨까요?
There was a problem hiding this comment.
이거 혹시 오타 아닐까요?
인접 노드 adjacent node 인 것 같아요!
There was a problem hiding this comment.
오타예요!!ㅎㅎ adjacentNodes로 수정해야할 것 같아요~ 👍
자료구조/Graph/daadaadaah/graph.test.js
Outdated
There was a problem hiding this comment.
DFS를 재귀를 안쓰고 별도로 스택을 만들어서 구현한 코드는 처음보네요! 요렇게도 할 수 있구나 하면서 배우고갑니다!
There was a problem hiding this comment.
오 저도 스택으로 구현 한건 처음 봤습니다! 저도 배워 갑니다!
gyim1345
left a comment
There was a problem hiding this comment.
dfs와 bfs까지 구현하셨군요! 고생하셨습니다!
자료구조/Graph/daadaadaah/graph.test.js
Outdated
There was a problem hiding this comment.
이거 혹시 오타 아닐까요?
인접 노드 adjacent node 인 것 같아요!
자료구조/Graph/daadaadaah/graph.test.js
Outdated
There was a problem hiding this comment.
오 저도 스택으로 구현 한건 처음 봤습니다! 저도 배워 갑니다!
자료구조/Graph/daadaadaah/graph.test.js
Outdated
There was a problem hiding this comment.
이거 조금 많이 길어 지는 것 같은데 메서드를 하나 만드는건 어떨까요?
Graph{
....
vertexHasAdjacentVertex(vertex) {
return function(targetVertex){
return this.vertexs.get(vertex).adjacentNode.has(targetVertex)
}
}
...
}
...
test{
...
expect(graph.vertexHasAdjacentVertex('A')('C').toBeFalsy();
...
}
There was a problem hiding this comment.
오~ 메서드로 하나 만드는게 더 좋겠네용!!ㅎㅎㅎ 좋은 지적 감사합니다~ 😀
No description provided.