← Expedia questions
CodingEasy

Check if undirected graph is a tree

Filed under Expedia

Given an undirected graph with V vertices and an adjacency list, determine if the graph is a tree. A graph is a tree if it is connected and contains no cycles. You must use Breadth-First Search (BFS)…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Expedia questions

Collected from public candidate posts and coding forums. Updated Nov 2026.