Binary search basic topic - binary template
Binary search basis
1. Preface
In the past, I always felt that I had to go through all the concepts before I could start to brush the questions. I didn't know that practice was the shortcut to master knowledge, rather than forgetting to recite it. To learn knowledge, we need to settle down and go step by step, otherwise we will be punished fo ...
Posted by SnaD on Wed, 03 Nov 2021 12:04:20 -0700
leetcode [stack and queue - simple] 232. Stack implements queue
preface
Hello, I'm long Lu. I'm just a junior now. I'm working on the back end and occasionally on the front end. Now the main language is Java. For a long time before, I was learning some technologies of web development. I haven't studied and brushed questions like data structures and algorithms for a long time. I plan to pick them up and ...
Posted by rivasivan on Tue, 02 Nov 2021 12:17:37 -0700
LeetCode algorithm -- binary search + double pointer
Although lz is still a master of laboratory brick moving, with the ambition of becoming an excellent programmer ape and the idea of "stupid birds fly first", I decided to start my journey of LeetCode (sprinkle flowers ★, °: ☆ ( ̄▽  ̄) / $:. ° ★.)
I measured my level rationally. After some selection, I decided to start wit ...
Posted by rroc on Mon, 01 Nov 2021 05:24:01 -0700
Swordfinger offer|| Special assault 40-day brush plan (days 1-20)
Title address: https://leetcode-cn.com/study-plan/lcof/?progress=xcewnbs
summary
When looking for the middle node of the chain table, use the fast and slow pointers, when both the fast and slow pointers are initially pointing to the head, the end condition cannot be
while(fast!=null&&fast.next!=null)
Because of this, if I judge ...
Posted by kusal on Sun, 31 Oct 2021 14:09:29 -0700
Java description LeetCode, 123. Best Time to Buy and Sell Stock III
Hello, I'm hehaige. I 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 motivation.
1-1: title
You are given an array prices where prices[i] is the price of a given stock on the ith day.
Find the maximum profit you can achieve ...
Posted by cristiano on Sat, 30 Oct 2021 20:21:34 -0700
[detailed algorithm solution] DFS solution force buckle 463 Island perimeter
subject
A two-dimensional grid map grid of row x col is given, where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water. The grids in the grid are connected horizontally and vertically (not diagonally). The whole grid is completely surrounded by water, but there happens to be an island (or an island connected by one or more gri ...
Posted by garty on Sat, 30 Oct 2021 16:28:29 -0700
Classic interview questions of binary tree (you deserve it)
Classic interview questions of binary tree
Before that, I have published the basic knowledge of binary tree:
Detailed explanation of binary tree Next, I will tell you some classic and common binary tree interview questions
Preliminary interview questions
Maximum depth of binary tree
Question: Maximum depth of binary tree Solution idea: ...
Posted by gacon on Sat, 30 Oct 2021 12:46:33 -0700
[1024 Carnival] collection of OJ questions in the classic linked list of Li Kou
I will upload all the source codes of the current force deduction questions to my code cloud warehouse, Let me see the warehouse
Write in front First of all, I wish you a happy Carnival! This is our holiday
To pay tribute to 1024, today's force buckle series is no longer a question, but a combination of multiple questions
Also with our rec ...
Posted by MnilinM on Sun, 24 Oct 2021 04:49:18 -0700
LeetCode buckle biweekly 63
The happiest thing at the weekend is to fill in questions and write solutions to cook for his wife.
Weekly portal
2037. Make each student have the minimum number of seat movements
Idea: greed
Time complexity:
O
(
n
∗
...
Posted by jxrd on Fri, 22 Oct 2021 19:50:27 -0700
LeetCode 18. Sum of four numbers
LeetCode 18. Sum of four numbers
Title:
Give you an array of n integers, nums, and a target value, target. Please find and return the quads [nums[a], nums[b], nums[c], nums[d]]:
0 <= a, b, c, d < na. b, c and d are different from each othernums[a] + nums[b] + nums[c] + nums[d] == target
You can return answers in any order.
Example:
...
Posted by thetick on Fri, 22 Oct 2021 13:08:45 -0700