• Merge sort and cardinal sort


    Merge sort example Recursive sorting by iteration performance analysis Cardinal sort Multi keyword sorting Chain radix sort Comparison of various sorting methods

  • Java foundation — deep understanding of collection


    Java Foundation Set: After summing up for a long time, I found that it was clear to summarize from the perspective of interface, so this article mainly analyzes the collection from the perspective of interface* 1. Single column collection (collection interface) The collection interface is the parent interface of all single column collections. It also […]

  • The solution to the problem of Texas Hold’em


    Title Description Recently, aqua is a big fan of Texas Hold’em. So she found a lot of people to play with. Because of the large number of people, aqua has to change the rules of the game: All playing cards only look at the numbers, not the colors. The value of each card is one […]

  • How to analyze MySQL slow SQL?


    Content abstract: Enable slow query log to capture slow SQL Using explain to analyze slow SQL Using show profile to query SQL execution details Common SQL statement optimization 1、 Enable slow query log to capture slow SQL ① To query whether MySQL enables slow log capture: SHOW VARIABLES LIKE ‘%slow_query_log%’; If not, open: SET GLOBAL slow_query_log=1; ②   To view […]

  • Front end bug record – stuck due to array sorting


    Front end bug record – bug caused by lobashjs debounce debounce optimizationThese two bugs are actually the same bug. How can we say that? Both are right, and the mistake is to use them at the same time. Because of meI didn’t deal with the boundary, which caused me to sort a large array, causing […]

  • How fast and accurate is app search?


    Abstract:The concept of search is deeply rooted in the hearts of the people, but it is not easy to make a search service with excellent experience. This article is shared from Huawei cloud community “Application of cloud search service in app search scenario”Master he who writes code Search is everywhere, especially in today’s mobile Internet. […]

  • Understanding topological ordering


    preface Topological sort, also known as topological order, is a bit confusing, because topological sort is not a pure sort algorithm, it is only for the purpose of sortingA class of GraphsTo find a linear order that can be executed. This algorithm sounds like a big one. Today’s interviews are also very popular. For example, […]

  • Application of graph topological ordering and critical path solving


    1. Topological sorting 1.1 introduction to topological sorting There are ⼀ digraphs that represent ⼯ processes, in which ⽤ vertices represent activities, and arcs represent the priority relationship between activities. In this way, digraphs represent ⽹ activities for vertices, which is called activity on vertex networkAs shown in Figure 1.1.1 below:The finite set of activities […]

  • Oracle (day 4)


    1、 Distinct Syntax format: select distinct column name from table name 2、 Statistical function avg(x) count(1) count(*) max(x) min(x) sum(x) StdDev (x) to find the standard deviation of the value of X in a group of rows Variance (x) find the variance of x value in a group of rows Round and TRUNC: select round(avg(sal),4) […]

  • Gnawing concurrency (9): the foundation of memory model


    preface In concurrent programming, two key problems need to be solved How to communicate between threads; How to synchronize between threads; Thread communication refers to the mechanism by which threads exchange information. In imperative programming, there are two communication mechanisms between threadsShared memory and messaging。 In the shared memory concurrency modelThe common state of the […]

  • Data structure and algorithm search (static search and dynamic search)


    1. Overview Searching: is to determine a data element whose keyword is equal to the given value in the lookup table according to a given value.Search tableIs a collection of data elements (records) of the same type.KeyIt is the value of a data item in a data element, also known as key value. It can […]

  • Java array


    array concept Array array is a collection used to store multiple data of the same type. If you want to get the element value in the array, you can get it through the subscript of the element, which starts from 0. Create array Generally divided into dynamic initialization and static initialization Dynamic initialization: int [] […]