# Yahoo Coding Interview Questions

> 64 DSA problems asked in Yahoo coding interviews and online assessments, sorted easiest first with hints. Free practice for placements on InternHack.

Canonical: https://www.internhack.in/learn/dsa/companies/yahoo
Last updated: 2026-11-28

64 DSA problems tagged as asked in Yahoo coding interviews and online assessments. Below are all 64: 26 easy, 32 medium and 6 hard. Start with the easy ones, then move to medium. Practise free on InternHack and track your progress.

## Yahoo DSA problems, easiest first

1. [Best Time to Buy and Sell Stock](https://www.internhack.in/learn/dsa/problem/best-time-to-buy-and-sell-stock) (Easy)
2. [Binary Number with Alternating Bits](https://www.internhack.in/learn/dsa/problem/binary-number-with-alternating-bits) (Easy)
3. [Concatenation of Array](https://www.internhack.in/learn/dsa/problem/concatenation-of-array) (Easy)
4. [Contains Duplicate](https://www.internhack.in/learn/dsa/problem/contains-duplicate) (Easy)
5. [Happy Number](https://www.internhack.in/learn/dsa/problem/happy-number) (Easy)
6. [Intersection of Two Arrays](https://www.internhack.in/learn/dsa/problem/intersection-of-two-arrays) (Easy)
7. [Isomorphic Strings](https://www.internhack.in/learn/dsa/problem/isomorphic-strings) (Easy)
8. [Linked List Cycle](https://www.internhack.in/learn/dsa/problem/linked-list-cycle) (Easy)
9. [Longest Common Prefix](https://www.internhack.in/learn/dsa/problem/longest-common-prefix) (Easy)
10. [Make The String Great](https://www.internhack.in/learn/dsa/problem/make-the-string-great) (Easy)
11. [Matrix Cells in Distance Order](https://www.internhack.in/learn/dsa/problem/matrix-cells-in-distance-order) (Easy)
12. [Maximum Depth of Binary Tree](https://www.internhack.in/learn/dsa/problem/maximum-depth-of-binary-tree) (Easy)
13. [Merge Sorted Array](https://www.internhack.in/learn/dsa/problem/merge-sorted-array) (Easy)
14. [Move Zeroes](https://www.internhack.in/learn/dsa/problem/move-zeroes) (Easy)
15. [Number of Students Unable to Eat Lunch](https://www.internhack.in/learn/dsa/problem/number-of-students-unable-to-eat-lunch) (Easy)
16. [Palindrome Number](https://www.internhack.in/learn/dsa/problem/palindrome-number) (Easy)
17. [Recyclable and Low Fat Products](https://www.internhack.in/learn/dsa/problem/recyclable-and-low-fat-products) (Easy)
18. [Remove Linked List Elements](https://www.internhack.in/learn/dsa/problem/remove-linked-list-elements) (Easy)
19. [Reverse Linked List](https://www.internhack.in/learn/dsa/problem/reverse-linked-list) (Easy)
20. [Roman to Integer](https://www.internhack.in/learn/dsa/problem/roman-to-integer) (Easy)
21. [Search Insert Position](https://www.internhack.in/learn/dsa/problem/search-insert-position) (Easy)
22. [Sqrt(x)](https://www.internhack.in/learn/dsa/problem/sqrtx) (Easy)
23. [Squares of a Sorted Array](https://www.internhack.in/learn/dsa/problem/squares-of-a-sorted-array) (Easy)
24. [Two Sum](https://www.internhack.in/learn/dsa/problem/two-sum) (Easy)
25. [Valid Anagram](https://www.internhack.in/learn/dsa/problem/valid-anagram) (Easy)
26. [Valid Parentheses](https://www.internhack.in/learn/dsa/problem/valid-parentheses) (Easy)
27. [3Sum](https://www.internhack.in/learn/dsa/problem/3sum) (Medium)
28. [Add Two Numbers](https://www.internhack.in/learn/dsa/problem/add-two-numbers) (Medium)
29. [Combination Sum](https://www.internhack.in/learn/dsa/problem/combination-sum) (Medium)
30. [Container With Most Water](https://www.internhack.in/learn/dsa/problem/container-with-most-water) (Medium)
31. [Decode String](https://www.internhack.in/learn/dsa/problem/decode-string) (Medium)
32. [Edit Distance](https://www.internhack.in/learn/dsa/problem/edit-distance) (Medium)
33. [Evaluate Division](https://www.internhack.in/learn/dsa/problem/evaluate-division) (Medium)
34. [Find All Duplicates in an Array](https://www.internhack.in/learn/dsa/problem/find-all-duplicates-in-an-array) (Medium)
35. [Find Peak Element](https://www.internhack.in/learn/dsa/problem/find-peak-element) (Medium)
36. [Flatten Nested List Iterator](https://www.internhack.in/learn/dsa/problem/flatten-nested-list-iterator) (Medium)
37. [Group Anagrams](https://www.internhack.in/learn/dsa/problem/group-anagrams) (Medium)
38. [Longest Repeating Character Replacement](https://www.internhack.in/learn/dsa/problem/longest-repeating-character-replacement) (Medium)
39. [LRU Cache](https://www.internhack.in/learn/dsa/problem/lru-cache) (Medium)
40. [Maximum Distance in Arrays](https://www.internhack.in/learn/dsa/problem/maximum-distance-in-arrays) (Medium)
41. [Maximum Number of Occurrences of a Substring](https://www.internhack.in/learn/dsa/problem/maximum-number-of-occurrences-of-a-substring) (Medium)
42. [Minimum Number of Arrows to Burst Balloons](https://www.internhack.in/learn/dsa/problem/minimum-number-of-arrows-to-burst-balloons) (Medium)
43. [Network Delay Time](https://www.internhack.in/learn/dsa/problem/network-delay-time) (Medium)
44. [Non-decreasing Subsequences](https://www.internhack.in/learn/dsa/problem/non-decreasing-subsequences) (Medium)
45. [Number of Islands](https://www.internhack.in/learn/dsa/problem/number-of-islands) (Medium)
46. [Peeking Iterator](https://www.internhack.in/learn/dsa/problem/peeking-iterator) (Medium)
47. [Product of Array Except Self](https://www.internhack.in/learn/dsa/problem/product-of-array-except-self) (Medium)
48. [Restore IP Addresses](https://www.internhack.in/learn/dsa/problem/restore-ip-addresses) (Medium)
49. [Rotate Image](https://www.internhack.in/learn/dsa/problem/rotate-image) (Medium)
50. [Search in Rotated Sorted Array](https://www.internhack.in/learn/dsa/problem/search-in-rotated-sorted-array) (Medium)
51. [Set Matrix Zeroes](https://www.internhack.in/learn/dsa/problem/set-matrix-zeroes) (Medium)
52. [Shortest Path in Binary Matrix](https://www.internhack.in/learn/dsa/problem/shortest-path-in-binary-matrix) (Medium)
53. [Spiral Matrix](https://www.internhack.in/learn/dsa/problem/spiral-matrix) (Medium)
54. [String Compression](https://www.internhack.in/learn/dsa/problem/string-compression) (Medium)
55. [Subarray Sum Equals K](https://www.internhack.in/learn/dsa/problem/subarray-sum-equals-k) (Medium)
56. [Top K Frequent Elements](https://www.internhack.in/learn/dsa/problem/top-k-frequent-elements) (Medium)
57. [Validate Binary Search Tree](https://www.internhack.in/learn/dsa/problem/validate-binary-search-tree) (Medium)
58. [Word Break](https://www.internhack.in/learn/dsa/problem/word-break) (Medium)
59. [Largest Palindrome Product](https://www.internhack.in/learn/dsa/problem/largest-palindrome-product) (Hard)
60. [Maximal Rectangle](https://www.internhack.in/learn/dsa/problem/maximal-rectangle) (Hard)
61. [Median of Two Sorted Arrays](https://www.internhack.in/learn/dsa/problem/median-of-two-sorted-arrays) (Hard)
62. [Serialize and Deserialize Binary Tree](https://www.internhack.in/learn/dsa/problem/serialize-and-deserialize-binary-tree) (Hard)
63. [Sliding Window Maximum](https://www.internhack.in/learn/dsa/problem/sliding-window-maximum) (Hard)
64. [Subarrays with K Different Integers](https://www.internhack.in/learn/dsa/problem/subarrays-with-k-different-integers) (Hard)

## Prepare for the rest of the Yahoo process

- [Aptitude questions by company](https://www.internhack.in/learn/aptitude/companies)
- [Technical interview questions](https://www.internhack.in/learn/interview)
- [Free ATS resume check](https://www.internhack.in/ats-score/try), no signup

## Other companies

- [Google](https://www.internhack.in/learn/dsa/companies/google) (2217)
- [Amazon](https://www.internhack.in/learn/dsa/companies/amazon) (1938)
- [Meta](https://www.internhack.in/learn/dsa/companies/meta) (1387)
- [Microsoft](https://www.internhack.in/learn/dsa/companies/microsoft) (1352)
- [Bloomberg](https://www.internhack.in/learn/dsa/companies/bloomberg) (1173)
- [Tiktok](https://www.internhack.in/learn/dsa/companies/tiktok) (383)
- [Uber](https://www.internhack.in/learn/dsa/companies/uber) (381)
- [Apple](https://www.internhack.in/learn/dsa/companies/apple) (356)
- [Oracle](https://www.internhack.in/learn/dsa/companies/oracle) (340)
- [Goldman Sachs](https://www.internhack.in/learn/dsa/companies/goldman-sachs) (270)
- [Adobe](https://www.internhack.in/learn/dsa/companies/adobe) (227)
- [TCS](https://www.internhack.in/learn/dsa/companies/tcs) (217)
- [Salesforce](https://www.internhack.in/learn/dsa/companies/salesforce) (189)
- [Linkedin](https://www.internhack.in/learn/dsa/companies/linkedin) (180)
- [Zoho](https://www.internhack.in/learn/dsa/companies/zoho) (179)
- [IBM](https://www.internhack.in/learn/dsa/companies/ibm) (170)
- [Infosys](https://www.internhack.in/learn/dsa/companies/infosys) (158)
- [Walmart Labs](https://www.internhack.in/learn/dsa/companies/walmart-labs) (152)
- [Accenture](https://www.internhack.in/learn/dsa/companies/accenture) (144)
- [Nvidia](https://www.internhack.in/learn/dsa/companies/nvidia) (137)
- [Yandex](https://www.internhack.in/learn/dsa/companies/yandex) (134)
- [DE Shaw](https://www.internhack.in/learn/dsa/companies/de-shaw) (124)
- [Visa](https://www.internhack.in/learn/dsa/companies/visa) (124)
- [Flipkart](https://www.internhack.in/learn/dsa/companies/flipkart) (117)

## Related

- [Home](https://www.internhack.in/)
- [Learn](https://www.internhack.in/learn)
- [DSA by company](https://www.internhack.in/learn/dsa/companies)
