0 day streak

OYO coding interview questions

Product India Machine coding / LLD

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
Boundary of Binary TreeViews Medium Trees & BST Uber, Snowflake, Nutanix +10 Solve
Copy List with Random PointerMiscellaneous Medium Linked List Google, Amazon, Microsoft +23 Solve
Shortest Subarray with Sum at Least KMonotonic Stack Hard Monotonic Stack Coupang, Goldman Sachs, Tekion Solve
Binary Tree Zigzag Level Order TraversalTraversals Medium Trees & BST Amazon, LinkedIn, Nutanix +23 Solve
Search in Rotated Sorted ArrayRotated Array Medium Binary Search Amazon, Microsoft, Apple +59 Solve
Sort ColorsDutch National Flag Medium Arrays & Hashing Microsoft, Nvidia, Expedia Group +43 Solve
Koko Eating BananasBinary Search on Answer Space Medium Binary Search Amazon, Netflix, Uber +34 Solve
Furthest Building You Can ReachTop K / Kth Largest / Smallest Medium Heaps Twilio, Salesforce, Samsung +5 Solve
House Robber IIIPostorder + Multiple Return Values Medium Trees & BST Amazon, Airbnb, DocuSign +3 Solve
Merge k Sorted ListsMerge K Sorted Hard Heaps Google, Amazon, Microsoft +59 Solve
3SumTwo Sum Medium Arrays & Hashing Google, Amazon, Microsoft +68 Solve
Longest Common PrefixString Basics Easy Arrays & Hashing Amazon, Microsoft, Bloomberg +41 Solve
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +101 Solve
Meeting Rooms IILine Sweep Medium Intervals Google, Amazon, Meta +50 Solve
Frequency of the Most Frequent ElementSliding Window · Variable Medium Arrays & Hashing Goldman Sachs, Red Hat, Brex +1 Solve
Decode Ways1D DP Medium Dynamic Programming Google, Meta, Tesla +21 Solve
Insert Delete GetRandom O(1)Hash Map + Array Medium Design Data Structures Google, Amazon, Apple +50 Solve
Largest Rectangle in HistogramMonotonic Stack Hard Monotonic Stack Microsoft, Meta, DoorDash +23 Solve
Find Median from Data StreamAdvanced Hard Heaps Google, Amazon, Apple +47 Solve
Longest Increasing Subsequence1D DP Medium Dynamic Programming Google, Microsoft, TikTok (ByteDance) +29 Solve
Palindrome PartitioningChoice per Position Medium Recursion & Backtracking Microsoft, Coupang, Qualtrics +3 Solve
Jump Game IIGreedy Medium Arrays & Hashing Google, DoorDash, Nutanix +25 Solve
Rotting OrangesMulti source BFS Medium Graphs Google, Amazon, Microsoft +48 Solve
Gas StationKadane's Algorithm Medium Arrays & Hashing Amazon, Microsoft, Bloomberg +23 Solve
Valid ParenthesesStack Basics Easy Stack Google, Amazon, Microsoft +119 Solve
All Nodes Distance K in Binary TreeChild + Ancestor Handling Medium Trees & BST Amazon, Meta, Apple +14 Solve
Word LadderBFS for shortest path Hard Graphs Google, Amazon, Microsoft +39 Solve
Validate Binary Search TreePostorder + Multiple Return Values Medium Trees & BST Google, Microsoft, Meta +35 Solve
Optimal Account BalancingBitmask DP Hard Dynamic Programming Stripe, Pinterest, Zscaler +6 Solve
Delete and Earn1D DP Medium Dynamic Programming Microsoft, Salesforce, Morgan Stanley +4 Solve
Reverse Nodes in k-GroupFront Middle Back Pointer Hard Linked List Amazon, Microsoft, Meta +33 Solve
Search a 2D Matrix II (Young Tableau)2D Binary Search + Step Search Medium Binary Search Microsoft, Tripadvisor, Baidu +13 Solve
Trim a Binary Search TreeBST Basics Medium Trees & BST Yahoo, UBS, Persistent Systems +1 Solve
Subarray Sum Equals KPrefix Sum Strategy Medium Arrays & Hashing Google, Amazon, Microsoft +41 Solve
Minimum Knight MovesBFS for shortest path Medium Graphs Microsoft, Uber, Databricks +9 Solve
Sliding Window MaximumMonotonic Stack Hard Monotonic Stack Google, Amazon, Microsoft +51 Solve
House RobberAlternate Selection / Pick / Not pick Medium Dynamic Programming Google, Microsoft, Airbnb +43 Solve
Next PermutationRight to Left Traversal Medium Arrays & Hashing Google, Amazon, Microsoft +31 Solve
Lowest Common Ancestor of a Binary TreeLCA Medium Trees & BST Google, Amazon, Microsoft +46 Solve
Minimum Cost to Connect SticksTop K / Kth Largest / Smallest Medium Heaps Google, X (Twitter), JPMorgan Chase +8 Solve
Kth Smallest Element in a Sorted MatrixBinary Search on Answer Space Medium Binary Search X (Twitter), OpenAI, Chewy +4 Solve
Linked List Cycle IISlow Fast Pointers Medium Linked List Microsoft, Airbnb, Autodesk +21 Solve
First Missing PositiveIn-place Transformations Hard Arrays & Hashing Amazon, Microsoft, Netflix +34 Solve
Same TreeRecursion Easy Trees & BST Deutsche Bank, SAP, Klarna +4 Solve
Binary Tree Inorder Traversal (Iterative)Recursion Easy Trees & BST Anduril, Intel, HPE +7 Solve
Maximal RectangleMonotonic Stack Hard Monotonic Stack Google, Wayfair, Indeed +7 Solve
Longest Consecutive SequenceHash Set Lookup Medium Arrays & Hashing Google, Amazon, Microsoft +34 Solve
Trapping Rain WaterTwo Pointer Hard Arrays & Hashing Google, Amazon, Microsoft +88 Solve
Burst BalloonsInterval DP Hard Dynamic Programming Google, UiPath, Goldman Sachs +4 Solve
Surrounded RegionsDFS - Complement Trick Medium Graphs Apple, Uber, Nutanix +4 Solve
Minimum Path Sum2D DP Medium Dynamic Programming Dropbox, Palo Alto Networks, Waymo +20 Solve
Sqrt(x)Search on Answer Range Easy Binary Search TikTok (ByteDance), Wayfair, Epic Games +15 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Amazon, Microsoft +55 Solve
Delete Node in a Linked ListMiscellaneous Medium Linked List ServiceNow, JPMorgan Chase, PayPal +11 Solve
Kth Largest Element in an ArrayTop K / Kth Largest / Smallest Medium Heaps Amazon, Meta, Apple +51 Solve
LRU CacheLinked Lists Medium Design Data Structures Google, Amazon, Microsoft +140 Solve
Next Greater Element IIIRight to Left Traversal Medium Arrays & Hashing DoorDash, Grab, Akamai +2 Solve
Wildcard MatchingStrings Hard Dynamic Programming Snap, Instacart, TikTok (ByteDance) +11 Solve
Predict the WinnerInterval DP Medium Dynamic Programming Waymo, Goldman Sachs, Cisco +4 Solve
Water and Jug ProblemMath / Number Theory Medium Arrays & Hashing Lyft, Snap, BNY +3 Solve
Amount of Time for Binary Tree to Be InfectedChild + Ancestor Handling Medium Trees & BST Amazon, Microsoft, DoorDash +11 Solve
Left View of Binary TreeViews Easy Trees & BST Stripe, Electronic Arts, Zynga +10 Solve
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +135 Solve
Coin Change IIKnapsack Medium Dynamic Programming Apple, Elastic, UiPath +7 Solve
Consecutive Numbers SumMath / Number Theory Hard Arrays & Hashing Airbnb, Indeed, Citrix +2 Solve
Vertical Order Traversal of a Binary TreeViews Hard Trees & BST Meta, Apple, Uber +15 Solve
Kth Smallest Element in a BSTReverse Inorder Traversal Medium Trees & BST Amazon, Uber, Bloomberg +8 Solve
Number of IslandsConnected Components Medium Graphs Google, Amazon, Microsoft +114 Solve
Sort ListMiscellaneous Medium Linked List Amazon, Microsoft, Lyft +5 Solve
Reverse Linked ListFront Middle Back Pointer Easy Linked List Microsoft, Apple, Bloomberg +81 Solve
Find First and Last Position of Element in Sorted ArrayBisect Medium Binary Search Meta, LinkedIn, Nvidia +29 Solve
Minimum Number of Swaps to Make the String BalancedStack Basics Medium Stack Twilio, Wayfair, ServiceNow +1 Solve
Also reported, being added to AlgoRung (17)

Kth largest element of two sorted arrays combined · Movement of Robots · Count Ways to Build Rooms in an Ant Colony · Gray Code · Populating Next Right Pointers in Each Node II · Minimum Depth of Binary Tree · Reverse Odd Levels of Binary Tree · How Many Numbers Are Smaller Than the Current Number · Top 10 scores from a stream of incoming scores · Rotate a matrix k times · Make a string a palindrome with at most k swaps · Ways to tile a 2xN board with 2x1 tiles · Count numbers with a given digit sum and digit count · Merge two BSTs into a sorted list · Find Distance in a Binary Tree · Minimum Time Visiting All Points · Circular Array Loop

Questions people ask

What coding questions does OYO ask most?

Boundary of Binary Tree, Copy List with Random Pointer, Shortest Subarray with Sum at Least K, Binary Tree Zigzag Level Order Traversal, Search in Rotated Sorted Array, Sort Colors, Koko Eating Bananas, Furthest Building You Can Reach.

Which topics come up in OYO coding rounds?

trees, linked list, dynamic programming, graphs, heaps, arrays.

How hard are OYO coding questions?

Of the reported questions, 9 are easy, 48 medium and 15 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.