Dynamic Programming

Sequential automata Daily brush leetcode learning algorithm Topic source leetcode 524. Match the longest word in the dictionary by deleting letters Give you a string s and a string array dictionary to find and return The longest string in the dictionary, which can be obtained by deleting some cUTF-8...

Posted by **VanHagar** on *Mon, 20 Sep 2021 16:14:27 +0530*

dynamic programming 1. Concept Dynamic programming: dynamic programming is nothing more than using historical records to avoid repeated calculations. We need some variables to save these history records, usually with one-dimensional array or two-dimensional array. Three steps of dynamic planninUTF-8...

Posted by **edawson003** on *Mon, 20 Sep 2021 20:00:44 +0530*

1: Title N jobs {1, 2,..., n} are processed on the assembly line composed of 2 machines M1 and M2. The processing sequence of each job is to process on M1 first, and then on m2. The time required for M1 and M2 processing operation i is ai and bi, respectively. The flow shop scheduling problem rUTF-8...

Posted by **BK87** on *Fri, 24 Sep 2021 20:16:55 +0530*

// Source : https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ // Date : 2021-09-25 Title Description: Given an array of prices, its ith element prices[i] represents the price of a given stock on day I. You can only choose to buy this stock one day and sell it on a different day UTF-8...

Posted by **UnknownPlayer** on *Sat, 25 Sep 2021 08:12:07 +0530*

LeetCode Origin: You are given a two-dimensional array of integers, envelopes[i] = [wi, hi], representing the width and height of the ith envelope. When another envelope is larger in width and height than this one, it can be put into another envelope, just like a Russian doll. Please calculateUTF-8...

Posted by **john_bboy7** on *Sat, 25 Sep 2021 21:59:12 +0530*

1, Title 1. Los Angeles Valley: P1255 number of stairs Title Description Stairs have NN Step, you can go upstairs one step at a time, or you can go upstairs two steps at a time. Compile a program to calculate how many different walking methods there are. Input format One number, the number of sUTF-8...

Posted by **phpanon** on *Sun, 26 Sep 2021 16:22:26 +0530*

Main idea of the title: n ( ≤ 2 e 5 ) n(\le 2e5) n(≤ 2e5) points on the number axis, m ( ≤ 2 e 5 ) m(\le 2e5) m(≤ 2e5) line segments on the number axis. You can move any point at a time by a distance of one unit How many operations can each segment of be accessed by at least one point Problem sUTF-8...

Posted by **examancer** on *Mon, 27 Sep 2021 16:45:02 +0530*

Title address Test site: LIS Practice: the two methods of time complexity O (nn) belong to DP method, and the method of time complexity O (nlog2 (n)) is an auxiliary array method, which can be understood in combination with divide and conquer. Analysis: the problem is to use several sets of intUTF-8...

Posted by **edevil** on *Wed, 29 Sep 2021 00:13:21 +0530*

01 backpack problem review 518. Change II easy class Solution { //amount = 5, coins = [1, 2, 5] how many methods can you use coins to sum up amount public int change(int amount, int[] coins) { int[] dp=new int[amount+1]; dp[0]=1; for(int val:coins){ for(int i=val;i

Posted by **defunct** on *Sat, 02 Oct 2021 00:37:40 +0530*

poj1080 The difficulty in the deformation of the longest common subsequence is initialization and equation of state #include #include #include #include #include #include #include #include #include #include #incluUTF-8...

Posted by **H4mm3r3r** on *Sun, 03 Oct 2021 01:51:35 +0530*