Word Break (LeetCode 139)
The problem You get a string and a list of words . Return if can be cut into…
Tag
42 posts
The problem You get a string and a list of words . Return if can be cut into…
The problem You get an grid of 0s and 1s, where is an obstacle. A robot starts…
The problem A robot starts at the top-left corner of an grid and wants to reach…
The problem An attendance record is a string of (present), (absent) and (late…
The problem Piles of stones sit in a row. Alice and Bob take turns, Alice first…
The problem Implement matching for a pattern against a string , where: matches…
The problem You get an array of positive integers and a number . Decide whether…
The problem Given an array of positive integers, return if it can be split…
The problem You get an integer array and an integer . Cut the array into…
The problem You get an grid of non-negative numbers. Walk from the top-left…
The problem A wooden stick has length , with positions to . You must make every…
The problem You get an array , where is the price of stepping off step . You…
The problem Given an integer array (at least one element, values can be…
The problem Given an integer array (at least one element; values may be…
The problem You get a matrix of characters and . Find the largest square made…
The problem Given a string (at least one character), return the length of its…
The problem Given a string , return its longest contiguous substring that reads…
The problem You get jobs. Job runs from to and pays . Choose a set of jobs…
The problem Given an integer array , return the length of the longest strictly…
The problem Given two strings and , return the length of their longest common…
The problem You start at index 0 of an array of non-negative integers. is the…
The problem You get three strings , and . Return if can be formed by…
The problem Houses form a binary tree. Each node has a value (the money inside…
The problem Houses stand in a row and is the money in house (all values non…
The problem Same rules as House Robber: is the money in house , and you cannot…
The problem Given two words and , return the minimum number of single-character…
The problem Given strings and , return the number of distinct ways to pick…
The problem A knight starts at the top-left of a grid and must reach the…
The problem Letters are encoded as numbers: , , …, . Given a string of digits…
The problem Count the strings of length built from the vowels that follow…
The problem Given an integer , return a list of length where is the number of…
The problem You get an and a list of coin denominations (unlimited supply of…
The problem You are at the bottom of a staircase with steps. Each move climbs…
The problem You get a list of coin denominations (unlimited supply of each) and…
The problem Balloons in a row each carry a number. Bursting balloon earns…
There are thousands of coding-interview questions but only about eighteen…
By now you can define a state and a recurrence (Lessons 17–18). The DP problems…
Ten problems that drill bitmask, interval, and tree DP from Lesson 24. The work…
Twelve problems that drill 2-D dynamic programming from Lesson 18 — two-sequence…
The final pattern. When a problem involves two sequences or a grid, one index…
Dynamic programming scares people more than anything else — but it’s a single…
Thirteen problems that drill 1-D dynamic programming from Lesson 17. The hard 9…
