Analysis and java implementation of search related topics in binary tree in Leetcode

Analysis and java implementation of search related topics in binary tree in Leetcode In fact, there are some miscellaneous problems in this category. It is basically to find some or a specific value in the binary tree. There are many problems. We will summarize them through two or three articles, but generally speaking, it is basically BFS, whi ...

Posted by HavokDelta6 on Mon, 23 May 2022 10:13:08 +0300

Leetcode Best Time to Buy and Sell Stock series topic analysis and java implementation

Leetcode Best Time to Buy and Sell Stock series topic analysis and java implementation The title of this series is to allow us to trade according to restrictions in a continuous period of stock prices to maximize profits. Each derivative title will set some restrictions Best Time to Buy and Sell Stock I Best Time to Buy and Sell Stock II Best ...

Posted by Karlos2394 on Sun, 22 May 2022 21:32:50 +0300

Dynamic Programming II

  Common dynamic programming problems (2) This article is reproduced at GitHub address: https://github.com/CyC2018/CS-Notes/ , only for personal review in the future. Integrated various data, invasion and deletion. Citation analysis: Content from official account article: https://mp.weixin.qq.com/s/lKQI0aS1MBwfPujC-m_zkA Use the dynamic ...

Posted by h123z on Sun, 22 May 2022 21:13:49 +0300

Leetcode once a day (19): merge two ordered arrays

Three minutes a day, embark on the counter attack of the algorithm. Previous collection A daily LeetCode collection Code warehouse GitHub: https://github.com/meteor1993/LeetCode Gitee: https://gitee.com/inwsy/LeetCode Title: merging two ordered arrays Title Source: https://leetcode-cn.com/problems/merge-sorted-array/ Here are two ordered i ...

Posted by abselect on Sun, 22 May 2022 11:29:12 +0300

852. Peak index of mountain range array; 162. Look for peaks; 165. Compare the version number; 166. Fraction to decimal; 171. Excel table column serial number; 172. Zero after factorial

We call array A that meets the following attributes Mountains:     A.length >= 3 There is 0 < I < a.length - 1 such that a [0] < a [1] < A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1] Given an array determined as mountains, return any that satisfies a [0] < a [1] < A[i-1] < A[i] > A[i+1] > ... > ...

Posted by suaji on Sun, 22 May 2022 10:56:47 +0300

"May Training" on the 20th day - binary search tree

foreword This is the 20th day of the May training camp. Today's training content is binary search tree. Problem solving report 1. Force buckle 700 Original title link 700. Searching in Binary Search Trees Topic overview Given a binary search tree (BST) root node root and an integer value val. You need to find the node whose node val ...

Posted by Duncan85 on Fri, 20 May 2022 22:40:36 +0300

LeetCode classification: find two

Find actual combat Case 1: sum of two numbers Given an integer array nums and a target value target, please find the two integers with and as the target value in the array and return their array subscripts. You can assume that each input will correspond to only one answer. However, the same element in the array cannot be used twice. Example: G ...

Posted by onewaylife on Fri, 20 May 2022 12:03:25 +0300

LeetCode algorithm path array part 1

LeetCode algorithm Most bogey, hope to do a series of articles to record the process of brushing algorithm. At present, it is mainly based on LeetCode https://leetcode-cn.com/circle/article/48kq9d/ The module of this post will brush the questions. The content is mainly the summary of the landlord in the post, as well as some personal experience ...

Posted by shak123 on Thu, 19 May 2022 20:46:21 +0300

leetcode top 100 questions - day 1: 1, 2, 3, 4

0. Always say It's time to pick up your studies that have been neglected for so long. Today is 2022-05-18. Brush at least two questions every day. I've written the first few times and directly abbreviated them. 1. 1. Sum of two numbers 1. Title Description 2. Topic analysis Traverse to find two numbers with mapping relationship, so y ...

Posted by php3ch0 on Thu, 19 May 2022 01:06:23 +0300

Leetcode - 3Sum (ideas to solve problems, refer to other people's code optimization, and wrong solutions)

Topic description Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Now given an array of n integers, look for three numbers that add up to 0. Find all the different groups, each group consists of three numbers, and the sum of the t ...

Posted by BlueSkyIS on Wed, 18 May 2022 09:50:36 +0300