Skip to content

Interview Solver

FeaturesPricingHelp
Sign In
FeaturesPricingHelpSign In
Interview Questions›Topics›Depth First Search

Depth First Search Interview Questions

Master 32 depth first search problems frequently asked in technical interviews. These questions test your understanding of depth first searchconcepts and are essential for coding interview success.

32
Total Problems
6
Easy
21
Medium
5
Hard

Related Topics

Breadth-First SearchTreeBinary TreeArrayGraphHash TableUnion FindBinary Search Tree
#3613MediumFrequency: 100%

Maximize Amount After Two Days of Conversions

Asked at Uber
ArrayStringDepth-First SearchBreadth-First SearchGraph
#1
Rank
#314MediumFrequency: 97%

Binary Tree Vertical Order Traversal

Asked at Meta
Hash TableTreeDepth-First SearchBreadth-First SearchSortingBinary Tree
#2
Rank
#364MediumFrequency: 88%

Nested List Weight Sum II

Asked at LinkedIn
StackDepth-First SearchBreadth-First Search
#3
Rank
#200MediumFrequency: 88%

Number of Islands

Asked at Salesforce
ArrayDepth-First SearchBreadth-First SearchUnion FindMatrix
#4
Rank
#339MediumFrequency: 84%

Nested List Weight Sum

Asked at Meta
Depth-First SearchBreadth-First Search
#5
Rank
#366MediumFrequency: 84%

Find Leaves of Binary Tree

Asked at LinkedIn
TreeDepth-First SearchBinary Tree
#6
Rank
#124HardFrequency: 83%

Binary Tree Maximum Path Sum

Asked at DoorDash
Dynamic ProgrammingTreeDepth-First SearchBinary Tree
#7
Rank
#236MediumFrequency: 79%

Lowest Common Ancestor of a Binary Tree

Asked at Meta
TreeDepth-First SearchBinary Tree
#8
Rank
#269HardFrequency: 79%

Alien Dictionary

Asked at Uber
ArrayStringDepth-First SearchBreadth-First SearchGraphTopological Sort
#9
Rank
#199MediumFrequency: 76%

Binary Tree Right Side View

Asked at Meta
TreeDepth-First SearchBreadth-First SearchBinary Tree
#10
Rank
#543EasyFrequency: 74%

Diameter of Binary Tree

Asked at Meta
TreeDepth-First SearchBinary Tree
#11
Rank
#975EasyFrequency: 73%

Range Sum of BST

Asked at Meta
TreeDepth-First SearchBinary Search TreeBinary Tree
#12
Rank
#329HardFrequency: 73%

Longest Increasing Path in a Matrix

Asked at DoorDash
ArrayDynamic ProgrammingDepth-First SearchBreadth-First SearchGraphTopological SortMemoizationMatrix
#13
Rank
#235MediumFrequency: 72%

Lowest Common Ancestor of a Binary Search Tree

Asked at LinkedIn
TreeDepth-First SearchBinary Search TreeBinary Tree
#14
Rank
#129MediumFrequency: 68%

Sum Root to Leaf Numbers

Asked at Meta
TreeDepth-First SearchBinary Tree
#15
Rank
#733EasyFrequency: 66%

Flood Fill

Asked at Microsoft
ArrayDepth-First SearchBreadth-First SearchMatrix
#16
Rank
#758MediumFrequency: 64%

Convert Binary Search Tree to Sorted Doubly Linked List

Asked at Meta
Linked ListStackTreeDepth-First SearchBinary Search TreeBinary TreeDoubly-Linked List
#17
Rank
#893MediumFrequency: 64%

All Nodes Distance K in Binary Tree

Asked at Meta
Hash TableTreeDepth-First SearchBreadth-First SearchBinary Tree
#18
Rank
#399MediumFrequency: 63%

Evaluate Division

Asked at Uber
ArrayStringDepth-First SearchBreadth-First SearchUnion FindGraphShortest Path
#19
Rank
#270EasyFrequency: 62%

Closest Binary Search Tree Value

Asked at Meta
Binary SearchTreeDepth-First SearchBinary Search TreeBinary Tree
#20
Rank
#721MediumFrequency: 62%

Accounts Merge

Asked at Meta
ArrayHash TableStringDepth-First SearchBreadth-First SearchUnion FindSorting
#21
Rank
#694MediumFrequency: 62%

Number of Distinct Islands

Asked at TikTok
Hash TableDepth-First SearchBreadth-First SearchUnion FindHash Function
#22
Rank
#133MediumFrequency: 60%

Clone Graph

Asked at Meta
Hash TableDepth-First SearchBreadth-First SearchGraph
#23
Rank
#854HardFrequency: 60%

Making A Large Island

Asked at Meta
ArrayDepth-First SearchBreadth-First SearchUnion FindMatrix
#24
Rank
#1029HardFrequency: 60%

Vertical Order Traversal of a Binary Tree

Asked at Meta
Hash TableTreeDepth-First SearchBreadth-First SearchSortingBinary Tree
#25
Rank
#207MediumFrequency: 56%

Course Schedule

Asked at Google
Depth-First SearchBreadth-First SearchGraphTopological Sort
#26
Rank
#114MediumFrequency: 53%

Flatten Binary Tree to Linked List

Asked at Google
Linked ListStackTreeDepth-First SearchBinary Tree
#27
Rank
#116MediumFrequency: 51%

Populating Next Right Pointers in Each Node

Asked at Meta
Linked ListTreeDepth-First SearchBreadth-First SearchBinary Tree
#28
Rank
#545MediumFrequency: 47%

Boundary of Binary Tree

Asked at Meta
TreeDepth-First SearchBinary Tree
#29
Rank
#100EasyFrequency: 43%

Same Tree

Asked at Meta
TreeDepth-First SearchBreadth-First SearchBinary Tree
#30
Rank
#230MediumFrequency: 37%

Kth Smallest Element in a BST

Asked at Meta
TreeDepth-First SearchBinary Search TreeBinary Tree
#31
Rank
#104EasyFrequency: 36%

Maximum Depth of Binary Tree

Asked at Amazon
TreeDepth-First SearchBreadth-First SearchBinary Tree
#32
Rank
View All Topics

Master Depth First Search in Real Interviews

Get AI-powered assistance when solving depth first search problems during your actual interviews. Our Interview Copilot provides real-time hints and optimal solutions instantly.

Algorithm explanations
Code optimization tips
Live interview support
Start Free TrialNo credit card requiredView Pricing
Interview Solver
  • Home
  • Pricing
  • Sign in
  • Contact
  • Blog
  • Companion
  • Help Center
  • Use Cases
  • Software Engineer
  • Product Manager
  • Misc
  • Privacy Policy
  • Terms and Conditions
  • Discord Community
  • Affiliate Program
  • Interview Questions
  • Google Interview Questions
  • Amazon Interview Questions
  • Microsoft Interview Questions
  • Meta Interview Questions
  • Apple Interview Questions
  • TikTok Interview Questions
  • View All →
© 2025 Interview Solver, Inc. All rights reserved.