---
title: "Discussion on \"Can we always change BFS solution to DFS solution?\" | Hashnode"
description: "Discussion on \"Can we always change BFS solution to DFS solution?\". There are some scenarios which you must use BFS or DFS"
url: "https://hashnode.com/posts/can-we-always-change-bfs-solution-to-dfs-solution/6875b0eb1227c3bb3de604d9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Can we always change BFS solution to DFS solution?](https://huanganni.hashnode.dev/can-we-always-change-bfs-solution-to-dfs-solution?utm_source=hashnode&utm_medium=feed)

There are some scenarios which you must use BFS or DFS

Jul 15, 2025 · 6 min read · huanganni.hashnode.dev  
Read the article

-   [#graph-algorithms](https://hashnode.com/tag/graph-algorithms)
-   [#depth-first-search](https://hashnode.com/tag/depth-first-search)
-   [#breadth-fist-search](https://hashnode.com/tag/breadth-fist-search)
-   [#java](https://hashnode.com/tag/java)
-   [#shortestpath](https://hashnode.com/tag/shortestpath)
-   [#cycle-detection](https://hashnode.com/tag/cycle-detection)
-   [#topologicalsorting](https://hashnode.com/tag/topologicalsorting)

## Written by

[Anni Huang](https://hashnode.com/@HuangAnni)

@HuangAnni · Singapore

  
[View profile](https://hashnode.com/@HuangAnni)

LLM Training Operation Specialist @ ByteDance | Ex-Master of IT in Business (AI track) at SMU

I’m Anni Huang, an AI researcher-in-training currently at ByteDance, specializing in LLM training operations with a coding focus. I bridge the gap between engineering execution and model performance, ensuring the quality, reliability, and timely delivery of large-scale training projects.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
