1-week interview sprint

Four problems a day, one pattern family at a time — arrays to dynamic programming in seven days.

  1. Two Sum Find the indices of the two numbers that add up to a target. Easy Most asked All 5 languages
  2. Contains Duplicate Return true if any value appears at least twice. Easy All 5 languages
  3. Valid Anagram Check whether two strings are anagrams of each other. Easy All 5 languages
  4. Group Anagrams Group words that are anagrams of each other. Medium Most asked All 5 languages
  5. Valid Palindrome Is the string a palindrome, ignoring case and non-alphanumerics? Easy All 5 languages
  6. 3Sum All unique triplets that sum to zero. Medium Most asked All 5 languages
  7. Best Time to Buy and Sell Stock Max profit from one buy and one later sell. Easy Most asked All 5 languages
  8. Longest Substring Without Repeating Characters Length of the longest substring with all-distinct characters. Medium Most asked All 5 languages
  9. Valid Parentheses Check that brackets are balanced and properly nested. Easy Most asked All 5 languages
  10. Min Stack A stack that returns its minimum in O(1). Medium All 5 languages
  11. Binary Search Find a target in a sorted array in O(log n). Easy All 5 languages
  12. Search in Rotated Sorted Array Binary search in a sorted array that was rotated. Medium Most asked All 5 languages
  13. Reverse Linked List Reverse a singly linked list. Easy Most asked All 5 languages
  14. Merge Two Sorted Lists Merge two sorted linked lists into one sorted list. Easy Most asked All 5 languages
  15. Linked List Cycle Detect whether a linked list has a cycle (Floyd's algorithm). Easy All 5 languages
  16. Remove Nth Node From End of List Delete the n-th node from the end in one pass. Medium All 5 languages
  17. Maximum Depth of Binary Tree Number of nodes on the longest root-to-leaf path. Easy All 5 languages
  18. Invert Binary Tree Mirror a binary tree. Easy All 5 languages
  19. Binary Tree Level Order Traversal Values of a binary tree, level by level (BFS). Medium Most asked All 5 languages
  20. Validate Binary Search Tree Check the BST property across the whole tree. Medium Most asked All 5 languages
  21. Number of Islands Count connected groups of land cells in a grid. Medium Most asked All 5 languages
  22. Course Schedule Can all courses be finished given prerequisites? (cycle detection) Medium All 5 languages
  23. Kth Largest Element in an Array The k-th largest value without fully sorting. Medium Most asked All 5 languages
  24. Merge Intervals Merge all overlapping intervals. Medium Most asked All 5 languages
  25. Climbing Stairs Ways to climb n stairs taking 1 or 2 steps at a time. Easy Most asked All 5 languages
  26. House Robber Max sum of non-adjacent elements. Medium All 5 languages
  27. Coin Change Fewest coins that make up an amount. Medium Most asked All 5 languages
  28. Subsets All subsets (the power set) of distinct integers. Medium All 5 languages

← All coding problems