0 day streak

Yahoo coding interview questions

Product Global

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
Your level: practise every reported question.
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +135 Solve
LRU CacheLinked Lists Medium Design Data Structures Google, Amazon, Microsoft +140 Solve
Maximum Depth of Binary TreeRecursion Easy Trees & BST LinkedIn, Spotify, Tesla +19 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
Serialize and Deserialize Binary TreeTree Serialization / Deserialization Hard Trees & BST Google, Amazon, Meta +22 Solve
Median of Two Sorted ArraysBinary Search on Partition Hard Binary Search Google, Amazon, Microsoft +49 Solve
Roman to IntegerRight to Left Traversal Easy Arrays & Hashing Apple, Bloomberg, Expedia Group +22 Solve
Word Break1D DP Medium Dynamic Programming Google, Amazon, Microsoft +35 Solve
Linked List CycleSlow Fast Pointers Easy Linked List Microsoft, Apple, Nvidia +67 Solve
Contains DuplicateHash Set Lookup Easy Arrays & Hashing Netflix, Airbnb, Spotify +7 Solve
Longest Substring Without Repeating CharactersSliding Window · Variable Medium Arrays & Hashing Google, Amazon, Microsoft +114 Solve
Add Two NumbersDummy Node Pattern Medium Linked List Amazon, Microsoft, Meta +33 Solve
Top K Frequent ElementsComposite comparator Medium Heaps Google, Amazon, Microsoft +53 Solve
Combination Sum (repeating elements)Pick / Not-Pick Medium Recursion & Backtracking Airbnb, Pinterest, Snap +20 Solve
Shuffle an ArrayRandomized Algorithms Medium Design Data Structures Uber, CrowdStrike, Palo Alto Networks +4 Solve
Trim a Binary Search TreeBST Basics Medium Trees & BST UBS, OYO, Persistent Systems +1 Solve
Restore IP AddressesChoice per Position Medium Recursion & Backtracking Microsoft, Nvidia, TikTok (ByteDance) +8 Solve
Longest Common PrefixString Basics Easy Arrays & Hashing Amazon, Microsoft, Bloomberg +41 Solve
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
Spiral MatrixMatrix Traversal Medium Arrays & Hashing Microsoft, Apple, Databricks +52 Solve
Validate Binary Search TreePostorder + Multiple Return Values Medium Trees & BST Google, Microsoft, Meta +35 Solve
Decode StringStack Basics Medium Stack Google, Amazon, Microsoft +31 Solve
Subarray Sum Equals KPrefix Sum Strategy Medium Arrays & Hashing Google, Amazon, Microsoft +41 Solve
Evaluate DivisionConnected Components Medium Graphs Amazon, Apple, Uber +17 Solve
Flatten Nested List IteratorStack Medium Design Data Structures LinkedIn, Airbnb, Tesla +7 Solve
Find Peak ElementUnique 1-D Binary Search Medium Binary Search Meta, Netflix, Uber +26 Solve
Word Search2D Matrix Backtracking Medium Recursion & Backtracking Google, Microsoft, Meta +36 Solve
Meeting Rooms IILine Sweep Medium Intervals Google, Amazon, Meta +50 Solve
Search in Rotated Sorted ArrayRotated Array Medium Binary Search Amazon, Microsoft, Apple +59 Solve
Number of IslandsConnected Components Medium Graphs Google, Amazon, Microsoft +114 Solve
Course ScheduleTopological Sort Medium Graphs Google, Amazon, Microsoft +42 Solve
Trapping Rain WaterTwo Pointer Hard Arrays & Hashing Google, Amazon, Microsoft +88 Solve
Merge Two Sorted ListsDummy Node Pattern Easy Linked List Google, Amazon, Microsoft +60 Solve
Merge k Sorted ListsMerge K Sorted Hard Heaps Google, Amazon, Microsoft +59 Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +68 Solve
Group AnagramsHashing Medium Arrays & Hashing Amazon, Microsoft, Meta +82 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Amazon, Microsoft +55 Solve
Kth Largest Element in an ArrayTop K / Kth Largest / Smallest Medium Heaps Amazon, Meta, Apple +51 Solve
Container With Most WaterTwo Pointer Medium Arrays & Hashing Google, Amazon, Microsoft +59 Solve
Can Place FlowersGreedy Easy Arrays & Hashing LinkedIn, Nutanix, Agoda +4 Solve
Top K Frequent WordsTop K / Kth Largest / Smallest Medium Heaps Google, Amazon, Bloomberg +17 Solve
Basic Calculator IIStack Basics Medium Stack Meta, Apple, Airbnb +18 Solve
Validate IP AddressSimulation Medium Arrays & Hashing Meta, Nvidia, X (Twitter) +14 Solve
Shortest Path in Binary MatrixBFS for shortest path Medium Graphs Google, Meta, Databricks +10 Solve
Also reported, being added to AlgoRung (7)

Peeking Iterator · Largest Palindrome Product · Non-decreasing Subsequences · Maximum Distance in Arrays · Binary Number with Alternating Bits · Matrix Cells in Distance Order · Optimize Water Distribution in a Village

Questions people ask

What coding questions does Yahoo ask most?

Two Sum, LRU Cache, Maximum Depth of Binary Tree, Reverse Linked List, Serialize and Deserialize Binary Tree, Median of Two Sorted Arrays, Roman to Integer, Word Break.

Which topics come up in Yahoo coding rounds?

arrays, strings, linked list, trees, graphs, design data structure.

How hard are Yahoo coding questions?

Of the reported questions, 10 are easy, 30 medium and 4 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.