New answers tagged recursion
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.♦
- 156k
0
votes
Trying to implement BFS and I am stuck
The pseudo code for DFS using recursion would look something like this:
...
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.♦
- 156k
Top 50 recent answers are included
Related Tags
recursion × 582algorithms × 176
recurrence-relation × 95
algorithm-analysis × 82
time-complexity × 61
runtime-analysis × 58
dynamic-programming × 56
computability × 54
asymptotics × 35
trees × 26
master-theorem × 23
induction × 22
complexity-theory × 20
data-structures × 20
graphs × 18
divide-and-conquer × 18
turing-machines × 17
binary-trees × 16
proof-techniques × 15
primitive-recursion × 15
combinatorics × 14
functional-programming × 13
terminology × 12
programming-languages × 12
discrete-mathematics × 12