Skip to content

Conversation

@JHLEE325
Copy link
Contributor

🧷 문제 링크

https://www.acmicpc.net/problem/13244

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

Trees are the subset of graphs that have the following 3 properties:

  1. It is connected: for every node you can reach every other node following edges.
  2. If an edge is removed, the graph is no longer connected. That is, some nodes cannot be reached anymore.
  3. When an edge is added between two existing nodes A and B, a cycle is created. There is a cycle if there is more than one way to go from A to B.

print tree if the graph represents a tree or graph otherwise.

Each test case contains number of nodes and edges.

🔍 풀이 방법

Use DFS Algorithm to check all node.
If graph represents a tree, all node have at least one edge, and have no cycle.

⏳ 회고

English is hard

@ShinHeeEul ShinHeeEul merged commit 94455c6 into main Dec 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants