• ## [selected sword fingers] the problem of “symmetric binary tree” from a macro perspective

Time：2021-12-31

Title Description This is from niuke.com“JZ 58 symmetric binary tree”, difficulty is“Difficulties”。 Tag: “sword finger offer”, “binary tree”, “sequence traversal”, “iteration”, “recursion” Description: Please implement a function to judge whether a binary tree is symmetrical. Note that if a binary tree is the same as the mirror image of the binary tree, it is defined […]

• ## Joint query set maintenance interval handover and merging

Time：2021-12-30

Any two numbers are different and the length is\(n\)Sequence of\(a\), yes\(q\)A message, such as\(a_l, a_{l+1},\cdots,a_r\)The minimum value of is\(r\) . Is there a contradiction? Contradictions fall into two categories: If the minimum values of the two intervals are the same, but the two intervals do not intersect (each number is different) If the union of […]

• ## [selected sword fingers] two solutions of “the next node of order traversal in binary tree” are explained in detail

Time：2021-12-30

Title Description This is from niuke.com“Next node of JZ 57 binary tree”, difficulty is“Medium”。 Tag: “sword finger offer”, “binary tree”, “middle order traversal” Given a node in a binary tree, please find the next node in the middle order traversal order and return. Note that the nodes in the tree contain not only the left […]

• ## Hands on implementation of a jump table

Time：2021-12-29

preface This paper mainly introduces the characteristics of jump table and how to implement a jump table by yourself. Skip list Jump table is a typical space for time model. The underlying data structure is an ordered single linked tableMultilayer index, the binary search method is implemented to query data. Multi tier index not only […]

• ## Solve or balance the complexity of microservices in distributed systems – Part 1

Time：2021-12-28

Original title: untangling microservices, or balancing complexity in Distributed Systems Original address Zhu Kunrong The honeymoon period of microservice is over. Uber is reconstituting thousands of micro services into a more manageable Scheme [1]; Kelsey Hightower is predicting that the monomer frame will be the future [2]; Sam Newman even stated that microservices should not […]

• ## Fancy play of one-way linked list → still playing reverse?

Time：2021-12-26

a moment of fun One day, my friend had a stomachache and accompanied him to the hospital Doctor: what have you eaten these days? Friend: I eat the leftover meal of my daughter-in-law and the leftover meal of my child Doctor: don’t you have a dog? Friend: do I have to eat the rest of […]

• ## Very detailed FFT (fast Fourier transform) concept and implementation

Time：2021-12-25

FFT First of all, we should explain a misunderstanding. Many people think that FFT is only used to deal with polynomial multiplication. In fact, FFT is used to realize the rapid conversion of polynomial coefficient representation and point value representation, so FFT is far more useful than polynomial multiplication. Pre knowledge of FFT: point value […]

• ## [simplest implementation] Python implementation of median leetcode algorithm in computing data stream

Time：2021-12-24

1、 Problem Description: medianIs the number in the middle of a sequence table.If the list length is even, the median is the average of the middle two numbers. For example,The median of [2,3,4] is 3The median of [2,3] is (2 + 3) / 2 = 2.5 Design a data structure that supports the following two […]

• ## Leetcode No.167 two sum II – input array is sorted (c + + implementation)

Time：2021-12-21

1. Title 1.1 English title Given an array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Return the indices of the two numbers (1-indexed) as an integer array answer of size 2, where 1 <= answer[0] < answer[1] <= numbers.length. […]

• ## Jump table of data structure and algorithm series (go)

Time：2021-12-20

Learn more about skip tables In the previous articleBinary search algorithm, it is said that the binary search algorithm depends on the random access characteristics of the array and can only be implemented with the array. If the data is stored in the linked list, there is no way to use the binary search algorithm […]

• ## [redis] pinduoduo’s interviewer asked me how to implement the bottom layer of Zset, and I drew the data structure of the jump table with my backhand

Time：2021-12-20

I’m Lufei, young Xia. Learning to shape life, technology to change the world. Share with you! introduction Redis is deeply loved by back-end developers in the e-commerce environment because it is completely based on memory, excellent performance and rich data types. Among them, the ordered set Zset is one of the basic data types, and […]

• ## Algorithmic journey | quick sorting method

Time：2021-12-11

HTML5 school – coder: in previous issues of “journey of algorithms”, we shared bubble sorting and selective sorting, both of which belong to “slow” sorting with time complexity of O (n ^ 2). Today, I share with you a variety of sorting algorithms that are widely used and fast——Quick sort method [average time complexity is […]