[algorithm thousand question case] daily LeetCode punch in - 86. Create string according to binary tree

📢 preface 🚀 Algorithm problem 🚀 🌲 Punching out an algorithm problem every day is not only a learning process, but also a sharing process 😜🌲 Tip: the problem-solving programming languages in this column are C# and Java🌲 To maintain a state of learning every day, let's work together to become the great God of algorithm 🧐!🌲 To ...

Posted by farzal on Mon, 29 Nov 2021 17:31:10 +0100

Minimum value problem of piggy bank (java)

1. Subjective questions   (100 points) Experiment 6: use dynamic programming algorithm to solve the problem of saving money (complete the contents of experiment report 3, 4, 5 and 6) 1, Experimental purpose         Practice using dynamic programming algorithms to solve practical problems (implemented in the ...

Posted by smileyriley21 on Sun, 28 Nov 2021 19:08:19 +0100

LeetCode: Buying and selling stocks II

Title Description Given an array prices, where   prices[i] is the price of a given stock on day I. Design an algorithm to calculate the maximum profit you can make. You can complete as many transactions as possible (buying and selling a stock multiple times). Note: you cannot participate in multiple transactions at the same time (you mu ...

Posted by wchris on Fri, 12 Nov 2021 00:20:17 +0100

Day 12_ Dynamic programming [introduction to algorithm]

70. Climb stairs Simple difficulty Suppose you are climbing stairs. You need n steps to reach the roof. You can climb one or two steps at a time. How many different ways can you climb to the roof? Note: given n is a positive integer. Example 1: Input: 2 Output: 2 Explanation: there are two ways to climb to the roof. 1. 1 rank + 1 ra ...

Posted by airwinx on Sun, 07 Nov 2021 05:18:11 +0100

Greedy algorithm java

Minimum dictionary order Given a string type array strs, find a splicing method so that the string formed after splicing all strings has the smallest dictionary order public class LowestLexicography { public static class MyComparator implements Comparator<String>{ @Override public int compare(String o1, Str ...

Posted by simrx11 on Thu, 04 Nov 2021 11:13:53 +0100

Noip simulation 85 2021.10.29 (to depression Trilogy)

preface Thanks to the author, I was directly depressed in the examination room Although I only saw Darling in the FRANXX, I still felt bad for \ (ichigo \) for a long time T1 \ ((ichigo) \) I came to see you dressed up like you like, Guang, no, da, darling Uncomfortable!!! But it's hard for me to cut \ (T1 \) without cutting it off On the exa ...

Posted by le007 on Fri, 29 Oct 2021 12:32:40 +0200