Leetcode 1601: the maximum number of building change requests that can be reached (diffcult)
catalogue
1. Title Description
2. Problem solving analysis
3. Code implementation
1. Title Description
We have n buildings, numbered from 0 to n - 1. There are several employees in each building. As it is the season to change buildings, some employees want to live in another building. Give you an array of requests, where requests[i] = [ ...
Added by optimiss on Mon, 28 Feb 2022 02:47:04 +0200
leetcode DFS+BFS+DSU question brushing summary 2
leetcode DFS+BFS+DSU question brushing summary 2
1-symmetric binary tree Title Link: Link here!!!
Idea 1: iterative method For a binary tree, the left and right subtrees enter the queue respectively. If the left and right subtrees are empty, the traversal ends. If only one of the left and right subtrees is empty, or the root nodes of the left ...
Added by xlordt on Sun, 27 Feb 2022 15:58:15 +0200
leetcode: Week 1
Catalogue of series articles
leetcode: Week 1
preface
. The blogger has just finished the study of RHCE. Next, he decides to brush the algorithm problem of leetcode, 2-3 times a day, and consolidate the review at the weekend.
first day
1. Binary search
Given an n-element ordered (ascending) integer array nums and a target value ...
Added by Northern Flame on Sun, 27 Feb 2022 10:53:56 +0200
553. Optimal division / 150 Evaluation of inverse Polish expression
553. Optimal division [medium question] [daily question]
Idea: [mathematical method]
Let the optimal solution of dividing these n numbers be Fn=x/y. obviously, if the numerator is as large as possible and the denominator is as small as possible, the result will be the largest. Because nums are all positive integers greater than 1, the smal ...
Added by kkonline on Sun, 27 Feb 2022 07:39:33 +0200
Leetcode 746. Climbing stairs with minimum cost (dynamic programming method and optimization solution)
Title address
Leetcode 746. Climb stairs with minimum cost
Title Description
Give you an integer array cost, where cost[i] is the cost of climbing up the ith step of the stairs. Once you pay this fee, you can choose to climb up one or two steps.
You can choose to climb the stairs from the steps with subscript 0 or subscript 1.
Please calc ...
Added by gladius on Sun, 27 Feb 2022 05:03:42 +0200
[algorithm] sword finger Offer special assault version Day4 array part
[algorithm] sword finger Offer special assault version Day4 array part
Title address: https://leetcode-cn.com/study-plan/lcof/?progress=wgzvtig
Objective: summarize key points and share ideas Note: under reasonable conditions, only use the code that is the simplest to understand and practical to use
I [medium] 010 Subarray with and k ...
Added by 00king00 on Sat, 26 Feb 2022 12:04:35 +0200
Algorithm question brushing record (Day 4)
Flip Game(poj1753)
Original question link Topic type: Enumeration At the beginning, I was very confused to see this problem. Since the turning of one point will affect the other points next to me, the problems such as which point to turn, how to enumerate, and how to determine whether it is necessary to turn poured into my mind. After thinking ...
Added by craigerjs on Sat, 26 Feb 2022 09:03:03 +0200
Leetcode notes -- basic topics of dynamic programming
Catalogue of series articles
I Array type problem solving method 1: dichotomy II Array type problem solving method 2: Double finger needle method III Array type problem solving method 3: sliding window IV Array type problem solving method 4: simulation V The basic operation and classic topics of the linked list Vi Classic title of hash tab ...
Added by Redapple on Fri, 25 Feb 2022 15:35:16 +0200
LeetCode 1706. Where does the ball meet? Multiple solutions to one problem
1706. Where does the ball meet Problem solution
Title Source: 1706. Where does the ball meet
2022.02.24 one question per day
Daily question column address: LeetCode daily problem solution is being updated ❤️💕
Today's topic is easier. After solving the problem, I'll pack my bags and go back to school tomorrow. I hope it's easy tomorrow, heh ...
Added by fredcool on Thu, 24 Feb 2022 12:28:42 +0200
Leetcode322: medium, BFS
catalogue
1. Title Description
2. Problem solving analysis
3. Code implementation
1. Title Description
Give you an integer array of coins to represent coins of different denominations; And an integer amount, representing the total amount. Calculate and return the minimum number of coins required to make up the total amount. If no combin ...
Added by marco75 on Thu, 24 Feb 2022 03:59:29 +0200