solulubeta
Sign in
Module 03

NeetCode 150

The 150 problems that cover every interview pattern, explained from brute force to optimal, with NeetCode's video for each.

The NeetCode 150 is the most popular list of coding-interview problems, grouped by pattern. For every problem you get a statement in plain words, the intuition, a brute-force approach, the optimal approach with its complexity, NeetCode's video walkthrough, and reference solutions in C, C++, Java and Python that you can run against hidden tests right in the browser.

  • Recognise all 18 core patterns, from hashing and two pointers to graphs and dynamic programming
  • Go from a brute-force idea to an optimal solution and state its complexity
  • Write bug-free solutions in your interview language, tested against edge cases
  • Cover the problems product companies actually ask
9
problems
1
free to start
~4h
of study
01

Arrays & Hashing

Hash sets and maps, counting, prefix products and encoding.

01 Contains DuplicateFree Hash set Easy
02 Valid Anagram Character counting Easy
03 Two Sum Hash map of complements Easy
04 Group Anagrams Hash map with a canonical key Medium
05 Top K Frequent Elements Counting + bucket sort Medium
06 Product of Array Except Self Prefix and suffix products Medium
07 Valid Sudoku Hash sets per row, column and box Medium
08 Encode and Decode Strings Length-prefixed encoding Medium
09 Longest Consecutive Sequence Hash set, start only at sequence beginnings Medium
02

Two Pointers

Shrinking a range from both ends on sorted or symmetric data.

03

Sliding Window

Growing and shrinking a window over a sequence.

04

Stack

Matching, monotonic stacks and expression evaluation.

06

Linked List

Pointer manipulation, fast and slow pointers, and design.

07

Trees

DFS, BFS, BST properties and tree construction.

08

Tries

Prefix trees for word search and autocomplete.

09

Heap / Priority Queue

Top-k, streaming medians and scheduling.

10

Backtracking

Subsets, permutations, combinations and constraint search.

11

Graphs

BFS, DFS, topological sort and union-find.

12

Advanced Graphs

Shortest paths, minimum spanning trees and Eulerian paths.

13

1-D Dynamic Programming

One-dimensional state, from stairs to subsequences.

14

2-D Dynamic Programming

Grids, two strings and knapsack-style state.

15

Greedy

Locally optimal choices that are provably globally optimal.

16

Intervals

Sorting by start or end, merging and sweeping.

17

Math & Geometry

Matrix walks, number tricks and geometry.

18

Bit Manipulation

XOR, masks and bit counting.