Top 50
Topic roadmap
Updated weekly · Last refresh Sep 12

Top 50 dfs Interview Questions

The most frequently asked dfs questions across all roles and companies, ranked by real interview frequency. Updated daily.

50questions
~21htotal time
105companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
dfsStart here. 35 questions · ~875 min
Detect Cycles in Task GraphMedium
Practice
Recently asked

Detect whether a directed dependency graph of startup tasks contains a cycle using DFS or topological ordering.

dfscycle detectionGraphsAqrXXiaomi TechnologyLucid Motors
Detect Cycles in Directed GraphMedium
Practice

Use DFS with recursion-state tracking to detect whether a directed dependency graph contains a cycle.

dfscycle detectionGraphsAltanaZendeskInfosys
Cycle Detection in Dependency GraphEasy
Practice

Use iterative DFS coloring to detect circular dependencies in an Applied Intuition simulation module graph.

dfsbfsGraphsApplied IntuitionKLANextdoor
Topological Sort for DependenciesMedium
Practice
Recently asked

Return a deterministic build order for Samsung Ads components using Kahn's topological sort, or report a dependency cycle.

dfsAlgorithmsGraphsSamsung AdsSwiggyBrex
Cycle Detection in Service GraphMedium
Practice

Detect circular Tencent Cloud TKE service dependencies using DFS node coloring.

dfstraversalGraphsTencentCloud Security ServicesAlten
Number of IslandsMedium
Practice
Recently asked

Count four-directionally connected islands in a 2D grid using BFS or DFS.

dfsbfsAlgorithmsAAmazon Kuiper Manufacturing EnterprisesCChatham FinancialAADCI - Karnataka
DFS on Binary TreeEasy
Practice

Traverse a PingOne policy tree in preorder using recursive depth-first search.

dfsPing IdentityJefferiesHiya
More dfs questions with a free account

Sign up to see every question

Create a free account to unlock this list and practice real interview questions.

Get my prep plan
2
Recursion10 questions · ~250 min
Flatten Nested Data StructuresMedium
Practice

Traverse arbitrarily nested arrays and return their scalar values in left-to-right order using depth-first traversal.

RecursionStackArraysAvidXchangeAtlassianChristian Dior Couture
More Recursion questions with a free account
3
More topics5 questions · ~125 min
More questions with a free account
The finish line: interview-readyComplete all 50 questions to finish this plan.