Force buckle 689. Maximum sum of three non overlapping subarrays

Title Source: https://leetcode-cn.com/problems/maximum-sum-of-3-non-overlapping-subarrays/ General meaning: Give an array nums and an integer k, find three non overlapping sub arrays with length k in the array, and find the maximum sum that the three sub arrays may have. Returns the left bound index of the largest and corresponding three sub a ...

Posted by mpharo on Wed, 08 Dec 2021 10:56:30 +0100

Day 7 course summary - list and list derivation

Day 7 course summary - list and list derivation 1, List related operators 1. Mathematical operators: +, * can be used for operations between lists 1) List 1 + list 2 - combine the elements in the two lists to produce a new list, such as: list1 = [100, 200, 300] list2 = [10, 20] print(list1 + list2) #The result is [100, 200, 300, 10, 20] 2 ...

Posted by wenquxing on Wed, 08 Dec 2021 04:15:58 +0100

[LeetCode single linked list] merge two ordered linked lists (21)

1. Title Merge the two ascending linked lists into a new ascending linked list and return the head node of the linked list. The new linked list is composed of all nodes of a given two linked lists. 1.1 example Example 1 1 1 : ...

Posted by orionblue on Tue, 07 Dec 2021 18:17:49 +0100

leetcode this week

1. Find the 3-bit even number Give you an integer array digits, where each element is a number (0 - 9). There may be duplicate elements in the array. You need to find all integers that meet the following conditions and are different from each other: The integer consists of three elements in digits connected in any order. The integer does not co ...

Posted by andrewholway on Sun, 05 Dec 2021 09:49:05 +0100

LeetCode brush notes double pointer sliding window

sliding window Sliding window: if two pointers point to the same linear table, the traversal direction is the same, and the starting points of the two pointers are different, a sliding window will be formed. The two pointers move with different strategies until the values of the two pointers are equal or meet other special conditions. 76 mini ...

Posted by yoda69 on Sun, 05 Dec 2021 06:37:06 +0100

Li Kou brush question diary

Give two strings S and t. Returns the shortest substring of all characters containing T in S. If there is no qualified substring in s, the empty string '' is returned. If there are multiple qualified substrings in s, any one is returned. Note: for repeated characters in T, the number of characters in the substring we are looking for must no ...

Posted by boske on Fri, 03 Dec 2021 20:04:49 +0100

leetcode lecture on algorithm interview in Dachang 18. Queue

leetcode lecture on algorithm interview in Dachang 18. Queue 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 ...

Posted by houssam_ballout on Fri, 03 Dec 2021 11:06:24 +0100

[LeetCode daily question] [December 3, 2021] 1005. Maximum array sum after K inversions

1005. Maximum array sum after K negations LeetCode: 1005. Maximum array sum after K negations simple single \color{#00AF9B} {simple} simple Give you an integer array nums and an integ ...

Posted by fogofogo on Fri, 03 Dec 2021 07:08:56 +0100

Two Questions a Day--2021/11/27

1588. Sum of all odd length subarrays describe You are given a positive integer array arr. Please calculate the sum of all possible odd length subarrays. A subarray is defined as a continuous subsequence in the original array. Please return the sum of all odd length subarrays in arr. thinking Try to find the number of times each number ...

Posted by mj_23 on Wed, 01 Dec 2021 15:45:16 +0100

[LeetCode learning plan] dynamic planning on the 12th day of algorithm introduction C + +

LeetCode [learning plan]: [algorithm] preface Dynamic programming (DP) is a big head in the algorithm. It aims to turn the problem to be solved into several subproblems. First solve the subproblems, and then get the solution of the original problem from the solutions of these subproblems. Sub problems in dynamic programming are often ...

Posted by tonbah on Wed, 01 Dec 2021 11:07:09 +0100