Top 50
Topic roadmap
Updated weekly · Last refresh Nov 1

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
158companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
dfsStart here. 31 questions · ~775 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
Recently asked

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

dfscycle detectionGraphsAltanaZendeskFuku
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
Cycle Detection in Dependency GraphEasy
Practice
Recently asked

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 AdsSwiggyRoblox
Lowest Common Ancestor in PedigreesMedium
Practice
Recently asked

Find the lowest common ancestor of two nodes in an Ancestry pedigree tree using depth-first search.

dfsData StructuresAlgorithmsNNxtWave Disruptive TechnologiesZocdocWalmart
Course Schedule With Cycle DetectionHard
Practice
Recently asked

Use topological sorting to detect course dependency cycles and return a valid completion order.

dfsbfscycle detectionSnapGooglePPiramal Finance
Reverse a Binary TreeEasy
Practice
Recently asked

Reverse every binary tree level by swapping each node's left and right children using depth-first traversal.

dfsData StructuresAlgorithmsMetaFFreelancerGoogle Cloud
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
More Recursion questions with a free account
3
More topics9 questions · ~225 min
More questions with a free account
The finish line: interview-readyComplete all 50 questions to finish this plan.