Top 25 most asked

The problems that come up again and again in screens and onsites, across all five languages.

  1. Two Sum Find the indices of the two numbers that add up to a target. Easy Most asked All 5 languages
  2. Valid Parentheses Check that brackets are balanced and properly nested. Easy Most asked All 5 languages
  3. Best Time to Buy and Sell Stock Max profit from one buy and one later sell. Easy Most asked All 5 languages
  4. Group Anagrams Group words that are anagrams of each other. Medium Most asked All 5 languages
  5. Top K Frequent Elements Return the k most frequent values. Medium Most asked All 5 languages
  6. Longest Substring Without Repeating Characters Length of the longest substring with all-distinct characters. Medium Most asked All 5 languages
  7. 3Sum All unique triplets that sum to zero. Medium Most asked All 5 languages
  8. Reverse Linked List Reverse a singly linked list. Easy Most asked All 5 languages
  9. Merge Two Sorted Lists Merge two sorted linked lists into one sorted list. Easy Most asked All 5 languages
  10. Binary Tree Level Order Traversal Values of a binary tree, level by level (BFS). Medium Most asked All 5 languages
  11. Validate Binary Search Tree Check the BST property across the whole tree. Medium Most asked All 5 languages
  12. Number of Islands Count connected groups of land cells in a grid. Medium Most asked All 5 languages
  13. Kth Largest Element in an Array The k-th largest value without fully sorting. Medium Most asked All 5 languages
  14. Merge Intervals Merge all overlapping intervals. Medium Most asked All 5 languages
  15. Climbing Stairs Ways to climb n stairs taking 1 or 2 steps at a time. Easy Most asked All 5 languages
  16. Coin Change Fewest coins that make up an amount. Medium Most asked All 5 languages
  17. Search in Rotated Sorted Array Binary search in a sorted array that was rotated. Medium Most asked All 5 languages
  18. LRU Cache A fixed-capacity cache that evicts the least recently used key, with O(1) get and put. Medium Most asked All 5 languages
  19. Retry with Exponential Backoff Retry a failing operation with exponential delays, but never retry non-retryable errors. Medium Most asked All 5 languages
  20. Product of Array Except Self Product of all other elements for each index, without division. Medium All 5 languages
  21. Contains Duplicate Return true if any value appears at least twice. Easy All 5 languages
  22. Min Stack A stack that returns its minimum in O(1). Medium All 5 languages
  23. Linked List Cycle Detect whether a linked list has a cycle (Floyd's algorithm). Easy All 5 languages
  24. Course Schedule Can all courses be finished given prerequisites? (cycle detection) Medium All 5 languages
  25. Token Bucket Rate Limiter Allow bursts up to a capacity while refilling at a steady rate. Medium All 5 languages

← All coding problems