DSA and coding

Data structures and algorithms in Java, grouped by the pattern that solves them, from Two Sum to hard problems.

63 questions6 topics4 levels27 must‑knowFree, no account

Your progress

L1 · 0 of 19L2 · 0 of 30L3 · 0 of 12L4 · 0 of 2

Level 1 · 19 questions. Begin with what gets asked in the first ten minutes. Levels 2 to 4 build on it.

Start with Level 1
Level 1First ten minutesTwo-sentence answers to what gets asked first.19 questions · 6 topics

Arrays and hashing coding interview questions

  1. 1.1Best Time to Buy and Sell StockMust‑know2 min
  2. 1.2Contains DuplicateMust‑know2 min
  3. 1.3Find All Numbers Disappeared in an Array3 min
  4. 1.4Missing NumberMust‑know2 min
  5. 1.5Two SumMust‑know3 min
  6. 1.6Valid AnagramMust‑know3 min

Linked list coding interview questions

  1. 3.1Intersection of Two Linked Lists4 min
  2. 3.2Linked List CycleMust‑know3 min
  3. 3.3Merge Two Sorted ListsMust‑know3 min

Sliding window coding interview questions

  1. 4.1Maximum Average Subarray IMust‑know3 min

Stack coding interview questions

  1. 5.1Valid ParenthesesMust‑know3 min

Two pointers coding interview questions

  1. 6.1Is Subsequence2 min
  2. 6.2Merge Sorted ArrayMust‑know3 min
  3. 6.3Move ZeroesMust‑know3 min
  4. 6.4Remove Duplicates from Sorted Array3 min
  5. 6.5Two Sum II - Input Array Is SortedMust‑know3 min
Level 2Daily jobWhat you use at work every week.30 questions · 6 topics

Arrays and hashing coding interview questions

  1. 1.1Group AnagramsMust‑know3 min
  2. 1.2Longest Consecutive SequenceMust‑know3 min
  3. 1.3Product of Array Except SelfMust‑know3 min
  4. 1.4Range Sum Query - ImmutableMust‑know2 min
  5. 1.5Subarray Sum Equals KMust‑know3 min

Linked list coding interview questions

  1. 3.1Add Two Numbers4 min
  2. 3.2Linked List Cycle II4 min
  3. 3.3Remove Nth Node From End of List4 min
  4. 3.4Reverse Linked List II4 min

Sliding window coding interview questions

  1. 4.1Find All Anagrams in a String3 min
  2. 4.2Fruit Into Baskets3 min
  3. 4.3Longest Repeating Character Replacement3 min
  4. 4.4Longest Substring Without Repeating CharactersMust‑know3 min
  5. 4.5Max Consecutive Ones III3 min
  6. 4.6Minimum Size Subarray Sum3 min
  7. 4.7Permutation in String3 min

Stack coding interview questions

  1. 5.1Asteroid Collision3 min
  2. 5.2Daily TemperaturesMust‑know3 min
  3. 5.3Min StackMust‑know3 min
  4. 5.4Minimum Remove to Make Valid Parentheses3 min
  5. 5.5Next Greater Element I3 min

Two pointers coding interview questions

  1. 6.13SumMust‑know4 min
  2. 6.2Container With Most WaterMust‑know3 min
Level 3SeniorProduction trade-offs and failure modes.12 questions · 6 topics

Arrays and hashing coding interview questions

  1. 1.1Continuous Subarray Sum3 min
  2. 1.2Maximum Product Subarray2 min

Linked list coding interview questions

  1. 3.1Copy List with Random Pointer4 min
  2. 3.2Reorder List4 min
  3. 3.3Sort List4 min

Sliding window coding interview questions

  1. 4.1Fraudulent Activity Notifications4 min
  2. 4.2Minimum Window Substring4 min
  3. 4.3Subarrays with K Different Integers3 min

Stack coding interview questions

  1. 5.1Largest Rectangle in Histogram3 min
  2. 5.2Remove K Digits4 min

Two pointers coding interview questions

  1. 6.1Trapping Rain Water3 min
Level 4InternalsHow it works underneath, and at scale.2 questions · 2 topics

Arrays and hashing coding interview questions

  1. 1.1First Missing Positive3 min