Global web icon
leetcode.com
https://leetcode.com/discuss/post/1152328/01-Knaps…
0/1 Knapsack Problem and Dynamic Programming - LeetCode
Dynamic Programming Career Algorithm 0/1 Knapsack is important problem for dynamic programming study since it provides many useful insights.
Global web icon
leetcode.com
https://leetcode.com/problem-list/dynamic-programm…
Dynamic Programming - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
Global web icon
leetcode.com
https://leetcode.com/problems/edit-distance/
Edit Distance - LeetCode
Can you solve this real interview question? Edit Distance - Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: * Insert a character * Delete a character * Replace a character Example 1: Input: word1 = "horse", word2 = "ros" Output: 3 Explanation: horse -> rorse (replace 'h ...
Global web icon
leetcode.com
https://leetcode.com/problems/coin-change/
Coin Change - LeetCode
Can you solve this real interview question? Coin Change - You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. You may assume that you have an ...
Global web icon
leetcode.com
https://leetcode.com/problems/maximum-profit-in-jo…
Maximum Profit in Job Scheduling - LeetCode
Can you solve this real interview question? Maximum Profit in Job Scheduling - We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime, endTime and profit arrays, return the maximum profit you can take such that there are no two jobs in the subset with overlapping time range. If you choose a job that ...
Global web icon
leetcode.com
https://leetcode.com/problems/burst-balloons/
Burst Balloons - LeetCode
Can you solve this real interview question? Burst Balloons - You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by an array nums. You are asked to burst all the balloons. If you burst the ith balloon, you will get nums[i - 1] * nums[i] * nums[i + 1] coins. If i - 1 or i + 1 goes out of bounds of the array, then treat it as if there is a ...
Global web icon
leetcode.com
https://leetcode.com/problems/longest-increasing-s…
Longest Increasing Subsequence - LeetCode
Can you solve this real interview question? Longest Increasing Subsequence - Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4. Example 2: Input: nums = [0,1,0,3,2,3] Output: 4 Example 3: Input: nums = [7 ...
Global web icon
leetcode.com
https://leetcode.com/problems/longest-common-subse…
Longest Common Subsequence - LeetCode
Can you solve this real interview question? Longest Common Subsequence - Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters ...
Global web icon
leetcode.com
https://leetcode.com/problems/climbing-stairs/
Climbing Stairs - LeetCode
Can you solve this real interview question? Climbing Stairs - You 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 to the top? Example 1: Input: n = 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 step 2. 2 steps Example 2: Input: n = 3 Output: 3 Explanation: There ...
Global web icon
leetcode.com
https://leetcode.com/studyplan/dynamic-programming…
Dynamic Programming - Study Plan - LeetCode
Dynamic Programming Summary Beginner friendly Common and essential DP patterns Learn DP in a recursive manner