Tag：Complexity

Time：20211231
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 […]

Time：20211230
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 […]

Time：20211230
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 […]

Time：20211229
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 […]

Time：20211228
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 […]

Time：20211226
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 daughterinlaw and the leftover meal of my child Doctor: don’t you have a dog? Friend: do I have to eat the rest of […]

Time：20211225
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 […]

Time：20211224
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 […]

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

Time：20211220
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 […]

Time：20211220
I’m Lufei, young Xia. Learning to shape life, technology to change the world. Share with you! introduction Redis is deeply loved by backend developers in the ecommerce 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 […]

Time：20211211
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 […]