Enabled dynamic switching between top-down and bottom-up in the hybrid stepwise BFS algorithm.