Graphs

Build graph skills through traversal, components, cycles, ordering, shortest paths and spanning trees, with linked concept lessons.

0 online
Overall Progress
PLUS – Videos, editorials, planner all in one place – Videos, editorials, personalised planner & TUFY all in one place to save your time.

Planly

Know more

Striver’s Graphs Sheet contains 46 coding questions. It retains all 44 practice questions from the corresponding A2Z graph section and includes additional questions from existing TUF resources. Introduction to Graph belongs before representation and traversal practice, while MST theory belongs beside the spanning-tree questions.

Striver’s Graph Sheet brings together 46 selected questions from existing takeUforward resources, with A2Z as the main source. The groups begin with traversal and grid exploration, then cover dependencies, weighted paths, component merging and important connections. Work through that order if these ideas are new to you.

For every attempt, first describe the graph you are solving. State whether it is directed, weighted or possibly disconnected, and what one vertex represents. That short description often reveals a requirement that a familiar algorithm would otherwise miss.

Topics covered in this practice sheet

The practice covers visiting reachable nodes, finding components, detecting cycles and using ordering constraints. Shortest-path questions depend on edge weights and other graph conditions, while spanning-tree questions ask for a different kind of result. The input representation and whether the graph is directed affect how each algorithm is applied.

  • Graph representations, traversals, reachability, components and cycles.
  • Ordering constraints and shortest-path questions.
  • Minimum spanning trees and other retained interview applications.

Beginner lessons and prerequisites

Use the existing graph introduction to learn vertices, edges, direction, weights and graph representations. Know arrays, collections, recursion or an explicit stack, and queues before the traversal questions. The separate MST lesson supports the spanning-tree portion after the earlier graph foundations.

Be comfortable with adjacency lists, queues, stacks and basic recursion. Know why an undirected edge normally appears in both endpoint lists. For a grid, identify the permitted neighbors and what makes a cell usable; different questions can use different movement and cell-value rules.

Learn BFS and DFS before the later groups. A min-priority queue helps with weighted path algorithms, while disjoint set union supports repeated component merges. You can study those structures when you reach the sections that use them rather than delaying all graph practice until every advanced algorithm is familiar.