New answers tagged

0 votes

Trying to implement BFS and I am stuck

Every tree is also a graph. Therefore, you can use breadth-first search directly on a tree. It doesn't require recursion; you can use a queue and a loop. As soon as you encounter a node that ...
D.W.'s user avatar
  • 156k
0 votes

Trying to implement BFS and I am stuck

The pseudo code for DFS using recursion would look something like this: ...
Amirreza Hashemi's user avatar
2 votes

Complexity of simulations in simulations

You can build a universal Turing machine with only 7 states, or only 15 states if you require that the tape store binary symbols. See https://en.wikipedia.org/wiki/Universal_Turing_machine#...
D.W.'s user avatar
  • 156k

Top 50 recent answers are included