Memoization Problems

Master memoization problems with AI-powered solutions. Get instant coding assistance during your technical interviews for all 32 problems in this category.

Total Problems: 32
Easy: 3
Medium: 8
Hard: 21
Showing 32 of 32 problems

Problems

Scroll within this area to browse all problems

#
Title
Difficulty
70

Climbing Stairs

Easy
1013

Fibonacci Number

Easy
787

Sliding Puzzle

Hard
329

Longest Increasing Path in a Matrix

Hard
139

Word Break

Medium
140

Word Break II

Hard
241

Different Ways to Add Parentheses

Medium
698

Partition to K Equal Sum Subsets

Medium
464

Can I Win

Medium
638

Shopping Offers

Medium
1236

N-th Tribonacci Number

Easy
691

Stickers to Spell Word

Hard
949

Cat and Mouse

Hard
2409

Number of Increasing Paths in a Grid

Hard
488

Zuma Game

Hard
2147

The Score of Students Solving Math Expression

Hard
930

All Possible Full Binary Trees

Medium
1555

Number of Ways of Cutting a Pizza

Hard
1732

Minimum One Bit Operations to Make Integers Zero

Hard
546

Remove Boxes

Hard
3414

Find Number of Ways to Reach the K-th Stair

Hard
2395

Longest Binary Subsequence Less Than or Equal to K

Medium
1986

Largest Color Value in a Directed Graph

Hard
1376

Selling Pieces of Wood

Hard
1727

Cat and Mouse II

Hard
2404

Number of Distinct Roll Sequences

Hard
1692

Number of Ways to Reorder Array to Get Same BST

Hard
3239

Minimum Number of Operations to Make X and Y Equal

Medium
1676

Minimum Number of Days to Eat N Oranges

Hard
3140

Count Visited Nodes in a Directed Graph

Hard
2028

The Earliest and Latest Rounds Where Players Compete

Hard
3733

Length of Longest V-Shaped Diagonal Segment

Hard

Memoization LeetCode Problems List

  • 70. Climbing Stairs - Easy - MemoizationYou are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb ... Topics: Math, Dynamic Programming, Memoization
  • 1013. Fibonacci Number - Easy - MemoizationThe Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding one... Topics: Math, Dynamic Programming, Recursion, Memoization
  • 787. Sliding Puzzle - Hard - MemoizationOn an 2 x 3 board, there are five tiles labeled from 1 to 5, and an empty square represented by 0. A move consists of choosing 0 and a 4-directionally... Topics: Array, Dynamic Programming, Backtracking, Breadth-First Search, Memoization, Matrix
  • 329. Longest Increasing Path in a Matrix - Hard - MemoizationGiven an m x n integers matrix, return the length of the longest increasing path in matrix. From each cell, you can either move in four directions: le... Topics: Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph, Topological Sort, Memoization, Matrix
  • 139. Word Break - Medium - MemoizationGiven a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary wor... Topics: Array, Hash Table, String, Dynamic Programming, Trie, Memoization
  • 140. Word Break II - Hard - MemoizationGiven a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all ... Topics: Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization
  • 241. Different Ways to Add Parentheses - Medium - MemoizationGiven a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and op... Topics: Math, String, Dynamic Programming, Recursion, Memoization
  • 698. Partition to K Equal Sum Subsets - Medium - MemoizationGiven an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.... Topics: Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
  • 464. Can I Win - Medium - MemoizationIn the "100 game" two players take turns adding, to a running total, any integer from 1 to 10. The player who first causes the running total to reach ... Topics: Math, Dynamic Programming, Bit Manipulation, Memoization, Game Theory, Bitmask
  • 638. Shopping Offers - Medium - MemoizationIn LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or mo... Topics: Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
  • 1236. N-th Tribonacci Number - Easy - MemoizationThe Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn.... Topics: Math, Dynamic Programming, Memoization
  • 691. Stickers to Spell Word - Hard - MemoizationWe are given n different types of stickers. Each sticker has a lowercase English word on it. You would like to spell out the given string target by cu... Topics: Array, Hash Table, String, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask
  • 949. Cat and Mouse - Hard - MemoizationA game on an undirected graph is played by two players, Mouse and Cat, who alternate turns. The graph is given as follows: graph[a] is a list of all n... Topics: Math, Dynamic Programming, Graph, Topological Sort, Memoization, Game Theory
  • 2409. Number of Increasing Paths in a Grid - Hard - MemoizationYou are given an m x n integer matrix grid, where you can move from a cell to any adjacent cell in all 4 directions. Return the number of strictly inc... Topics: Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph, Topological Sort, Memoization, Matrix
  • 488. Zuma Game - Hard - MemoizationYou are playing a variation of the game Zuma. In this variation of Zuma, there is a single row of colored balls on a board, where each ball can be col... Topics: String, Dynamic Programming, Stack, Breadth-First Search, Memoization
  • 2147. The Score of Students Solving Math Expression - Hard - MemoizationYou are given a string s that contains digits 0-9, addition symbols '+', and multiplication symbols '*' only, representing a valid math expression of ... Topics: Array, Hash Table, Math, String, Dynamic Programming, Stack, Memoization
  • 930. All Possible Full Binary Trees - Medium - MemoizationGiven an integer n, return a list of all possible full binary trees with n nodes. Each node of each tree in the answer must have Node.val == 0. Each e... Topics: Dynamic Programming, Tree, Recursion, Memoization, Binary Tree
  • 1555. Number of Ways of Cutting a Pizza - Hard - MemoizationGiven a rectangular pizza represented as a rows x cols matrix containing the following characters: 'A' (an apple) and '.' (empty cell) and given the i... Topics: Array, Dynamic Programming, Memoization, Matrix, Prefix Sum
  • 1732. Minimum One Bit Operations to Make Integers Zero - Hard - MemoizationGiven an integer n, you must transform it into 0 using the following operations any number of times: Change the rightmost (0th) bit in the binary repr... Topics: Dynamic Programming, Bit Manipulation, Memoization
  • 546. Remove Boxes - Hard - MemoizationYou are given several boxes with different colors represented by different positive numbers. You may experience several rounds to remove boxes until t... Topics: Array, Dynamic Programming, Memoization
  • 3414. Find Number of Ways to Reach the K-th Stair - Hard - MemoizationYou are given a non-negative integer k. There exists a staircase with an infinite number of stairs, with the lowest stair numbered 0. Alice has an int... Topics: Math, Dynamic Programming, Bit Manipulation, Memoization, Combinatorics
  • 2395. Longest Binary Subsequence Less Than or Equal to K - Medium - MemoizationYou are given a binary string s and a positive integer k. Return the length of the longest subsequence of s that makes up a binary number less than or... Topics: String, Dynamic Programming, Greedy, Memoization
  • 1986. Largest Color Value in a Directed Graph - Hard - MemoizationThere is a directed graph of n colored nodes and m edges. The nodes are numbered from 0 to n - 1. You are given a string colors where colors[i] is a l... Topics: Hash Table, Dynamic Programming, Graph, Topological Sort, Memoization, Counting
  • 1376. Selling Pieces of Wood - Hard - MemoizationYou are given two integers m and n that represent the height and width of a rectangular piece of wood. You are also given a 2D integer array prices, w... Topics: Array, Dynamic Programming, Memoization
  • 1727. Cat and Mouse II - Hard - MemoizationA game is played by a cat and a mouse named Cat and Mouse. The environment is represented by a grid of size rows x cols, where each element is a wall,... Topics: Array, Math, Dynamic Programming, Graph, Topological Sort, Memoization, Matrix, Game Theory
  • 2404. Number of Distinct Roll Sequences - Hard - MemoizationYou are given an integer n. You roll a fair 6-sided dice n times. Determine the total number of distinct sequences of rolls possible such that the fol... Topics: Dynamic Programming, Memoization
  • 1692. Number of Ways to Reorder Array to Get Same BST - Hard - MemoizationGiven an array nums that represents a permutation of integers from 1 to n. We are going to construct a binary search tree (BST) by inserting the eleme... Topics: Array, Math, Divide and Conquer, Dynamic Programming, Tree, Union Find, Binary Search Tree, Memoization, Combinatorics, Binary Tree
  • 3239. Minimum Number of Operations to Make X and Y Equal - Medium - MemoizationYou are given two positive integers x and y. In one operation, you can do one of the four following operations: Divide x by 11 if x is a multiple of 1... Topics: Dynamic Programming, Breadth-First Search, Memoization
  • 1676. Minimum Number of Days to Eat N Oranges - Hard - MemoizationThere are n oranges in the kitchen and you decided to eat some of these oranges every day as follows: Eat one orange. If the number of remaining orang... Topics: Dynamic Programming, Memoization
  • 3140. Count Visited Nodes in a Directed Graph - Hard - MemoizationThere is a directed graph consisting of n nodes numbered from 0 to n - 1 and n directed edges. You are given a 0-indexed array edges where edges[i] in... Topics: Dynamic Programming, Graph, Memoization
  • 2028. The Earliest and Latest Rounds Where Players Compete - Hard - MemoizationThere is a tournament where n players are participating. The players are standing in a single row and are numbered from 1 to n based on their initial ... Topics: Dynamic Programming, Memoization
  • 3733. Length of Longest V-Shaped Diagonal Segment - Hard - MemoizationYou are given a 2D integer matrix grid of size n x m, where each element is either 0, 1, or 2. A V-shaped diagonal segment is defined as: The segment ... Topics: Array, Dynamic Programming, Memoization, Matrix

Related LeetCode Topics

Memoization LeetCode Problems - Interview Coder