Skip to content

Commit 0e26a2f

Browse files
committed
Added stack and queue viewing for BFS and DFS
1 parent d6acbe4 commit 0e26a2f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

js/simulate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ function updateVisuals() {
321321
const score = queueCell.score
322322
if(score != -1)
323323
CellReferences[algorithm][pos[1] * Grid.width + pos[0]].innerHTML = score
324+
else
325+
CellReferences[algorithm][pos[1] * Grid.width + pos[0]].innerHTML = "0"
324326
})
325327

326328
// Set searching cell to #FFFF00, filter generated by: https://codepen.io/sosuke/pen/Pjoqqp

0 commit comments

Comments
 (0)