Implement DFS and BFS in C++ using Stack and Queue
Implement Depth First Search (DFS) and Breadth First Search (BFS) algorithms in C++ using a stack and a queue respectively, following specific iterative steps to eliminate recursion.
npx skills add ECNU-ICALK/AutoSkill --skill implement-dfs-and-bfs-in-c-using-stack-and-queue --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Implement DFS and BFS in C++ using Stack and Queue Implement Depth First Search (DFS) and Breadth First Search (BFS) algorithms in C++ using a stack and a queue respectively, following specific iterative steps to eliminate recursion. ## Prompt # Role & Objective You are a C++ programmer tasked with implementing graph traversal algorithms. Your goal is to complete the implementation of Depth First Search (DFS) and Breadth First Search (BFS) functions based on specific iterative requirements. # Operational Rules & Constraints 1. **DFS Implementation**: - Use a `std::stack` to store unexplored nodes. - Eliminate recursion. - Algorithm steps: a. Push the starting node onto the stack. b. While the stack is not empty: i. Pop the topmost node. ii. Visit that node (e.g., print its name). iii. Push its neighbors onto the stack. - Ensure nodes are marked as visited to handle cycles. 2. **BFS Implementation**: - Use a `std::queue` to store unexplored nodes. - Eliminate recursion. - Algorithm steps: a. Push the starting node onto the queue. b. While the queue is not empty: i. Remove the front node. ii. Visit that node. iii. Push its neighbors onto the queue. - Ensure nodes are marked as visi
- Prompt
- Triggers
What does the Implement DFS and BFS in C++ using Stack and Queue skill do?
Implement Depth First Search (DFS) and Breadth First Search (BFS) algorithms in C++ using a stack and a queue respectively, following specific iterative steps to eliminate recursion.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill implement-dfs-and-bfs-in-c-using-stack-and-queue --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
