leetcode essence of Dachang algorithm interview 20. String

leetcode essence of Dachang algorithm interview 20. String Video Explanation (efficient learning): Click to learn catalog: 1. Introduction 2. Time and space complexity 3. Dynamic planning 4. Greed 5. Binary search 6. Depth first & breadth first 7. Double pointer 8. Sliding window 9. Bit operation 10. Recursion & divide and conquer 11 Pr ...

Posted by mansuang on Fri, 03 Dec 2021 23:00:57 -0800

LeetCode kickoff week 269

Weekly portal The ranking is 131. It has been quite stable recently~ 2089. Find the target subscript after array sorting Idea: traversal, counting Time complexity: O ( n ) \mathcal{O}(n) O ...

Posted by ThermalSloth on Fri, 03 Dec 2021 18:56:01 -0800

Violent recursive attempt

1: Hanoi Tower problem Interview question 08.06. Hanoi Tower question LeetCode (LeetCode CN. Com)https://leetcode-cn.com/problems/hanota-lcci/ class Solution { public: void zhuanYi(int i,vector<int>&from,vector<int>&other,vector<int>&to){ if(i==1){int ding=from.back();from.pop_back();to.push_back(ding);} ...

Posted by GaryE on Fri, 03 Dec 2021 04:19:20 -0800

1, Array_ Prefix and array_ 304. Two dimensional area and retrieval - the matrix is immutable

Title Description Given a two-dimensional matrix, multiple requests of the following types: Calculate the sum of the elements within its sub rectangle. The upper left corner of the sub matrix is (row1, col1) and the lower right corner is (row2, col2). Implement the NumMatrix class: NumMatrix(int[][] matrix) initializes the given integer matri ...

Posted by alco19357 on Thu, 02 Dec 2021 15:28:36 -0800

Java description LeetCode, 45. Jump Game II jump game II

Hello everyone, I'm hehaige and focus on the back end. If I can, I want to be a code designer instead of an ordinary coder to witness the growth of hehaige. Your comments and praise are my biggest driving force. If you have any mistakes, please don't hesitate to comment. Thank you very much. Let's support the original! If there is a clerical er ...

Posted by Eratimus on Thu, 02 Dec 2021 10:42:41 -0800

leetcode essence of algorithm interview in Dachang 13. Monotone stack

leetcode essence of algorithm interview in Dachang 13. Monotone stack Video Explanation (efficient learning): Click to learn catalog: 1. Introduction 2. Time and space complexity 3. Dynamic planning 4. Greed 5. Binary search 6. Depth first & breadth first 7. Double pointer 8. Sliding window 9. Bit operation 10. Recursion & d ...

Posted by Jyotsna on Wed, 01 Dec 2021 14:41:11 -0800

Leetcode|greedy algorithm [allocation + interval] (135|435|455...)

Greedy Algorithm The simple understanding is to ensure the local optimization, the local results are irrelevant, and the results are the simple summation of the local optimal results to achieve the global optimization. assignment problem 455. Distribute cookies [Assign Cookies (Easy)] Title Description Suppose you are a great par ...

Posted by keyur.delhi on Wed, 01 Dec 2021 06:45:03 -0800

LeetCode brush questions - restore IP address #93#Medium

Discussion on the idea and source code of restoring IP address      The problem of restoring IP address is shown in the figure below. This problem belongs to the type of string and backtracking. It mainly focuses on the use of backtracking traversal method and the understanding of the characteristics of string itself. In th ...

Posted by pahunrepublic on Tue, 30 Nov 2021 20:45:04 -0800

Recursive divide and conquer --- example 1. Full Permutation

Recursive divide and Conquer - Example 1. Full Permutation 1, Problem description A recursive algorithm is designed to generate the full arrangement of n elements {r1, r2,..., rn} This question is related to Li Kou master station question 46 - the whole arrangement is the same , and Likou master station question 47 - full arrangement II 2, ...

Posted by ale_jrb on Tue, 30 Nov 2021 14:22:12 -0800

Merge and sort the first Hard problem of LeetCode (the number of the sum of LeetCode 327 intervals), Shuai

Hello, I'm Monday.We have talked about merging and sorting in recent algorithms. We'll open another one today. Two more questions.1, Greater than twice the number on the rightI'm afraid everyone will forget Merge sort , so practice with a question first.1. Title DescriptionFind the number in the given array that the current number is greater th ...

Posted by sean72 on Tue, 30 Nov 2021 07:41:28 -0800