Tag：thinking

Time：2021719
Original link: go letcode, author: San Jin and his meow PHP code Add two numbers This isLeetCodeThe second question is very conventional. The main stem is as follows: Two non empty linked lists are given to represent two non negative integers. Among them, their respective digits are stored in reverse order, and each node can […]

Time：2021716
Recently, I plan to learn something about data analysis. In the figure below, although there are a lot of advertising elements, there are many techniques. It is said that programmers should have a little product thinking and be sensitive to data. After reading the introduction of some training institutions, there are many knowledge points involved, […]

Time：2021715
Symmetric binary tree Create a function to determine whether a binary tree is symmetric As shown in the figure, this is a symmetric binary tree Note that this is not a symmetric binary tree Idea: start from the root node, compare its left subtree and right subtree nodes, and then recurse successively. As long as […]

Time：202176
A – Bovine Dilemma Solution: think that the problem said is a triangle, and there is a certain point (0,1), so here only need to find two points can form a triangle, and these two points are on the X axis, so you can know (0,1) to X axis is high, X axis two points […]

Time：202173
Click the blue “programmer book list” to follow me Add a “star sign” to show you good articles and books every day! Recommendation list of meituan technical team PrinciplesRay Dalio The author, ray Dalio, was born in an ordinary middleclass family in the United States. He was fired at the age of 26 […]

Time：2021627
1. Find duplicate email Own idea (wrong) SELECT a.Email FROM Person a,Person b WHERE a.Email = b.Email Results: all of them appeared in the tableSolution: calculate the number of times each email exists SELECT Email FROM Person GROUP BY Email HAVING COUNT(Email)>1 Solution 2: create a temporary table SELECT Email FROM( SELECT Email,COUNT(Email) as num FROM Person […]

Time：2021616
Website visits statistics, their own ideas:Whenever a user visits a page, the frontend initialization method automatically calls the backend interface for access statistics. A counter table can be created separately. Using an independent table can help avoid query cache failure. udpate hit_counter set cnt=cnt+1 ; But when a large number of users visit the website […]

Time：202168
Title addresshttps://leetcodecn.com/problems/symmetrictree/ 1. Recursion As like as two peas, the two most identical trees are mirrored. The relationship between them is satisfiednode1.left == node2.rightAndnode1.right == node2.leftThe time complexity O (n) n is the number of nodes; The space complexity O (H) H is the maximum depth of binary tree class Solution { public boolean isSymmetric(TreeNode […]

Time：202164
Title Requirements Given an input string, reverse the string word by word. For example, Given s = “the sky is blue”, return “blue is sky the”. Update (20150212): For C programmers: Try to solve it inplace in O(1) space. click to show clarification. Clarification: What constitutes a word? A sequence of nonspace characters constitutes a […]

Time：2021530
42. Rainwater thinking from typing import List import bisect class Solution: def trap(self, height: List[int]) > int: def helper(height, reverse=False): index, ans, left_max_h_index, n, water = 0, 0, 0, len(height), 0 if reverse: height.reverse() height, n = height + [0], n + 1 for index, h in enumerate(height): if index == 0 or index == […]

Time：202158
Topic introduction leetcode680 thinking This problem belongs to a simple type, the idea is not very complex, the use of double pointers, one point to the head of the string, one point to the tail, if the elements of the two pointers are equal, then each move one step to the middle, if not, you […]

Time：202151
Gitbook plugin for generating and exporting mind map in markdown homepage Github : https://snowdreams1006.github.io/gitbookpluginsimplemindmap/ GitLab: https://snowdreams1006.gitlab.io/gitbookpluginsimplemindmap/ Gitee : https://snowdreams1006.gitee.io/gitbookpluginsimplemindmap/ Screen capture {% simplemindmap %} simplemindmap config book.json plugins others simplemindmap pluginsConfig others simplemindmap type preset linkShape autoFit style custom file.md markdown type preset linkShape autoFit style txtmap json mindmup {% endsimplemindmap %} usage Step 1 […]