• MySQL performance optimization


    In the Internet company MySQL is widely used, and we often have the demand of MySQL performance optimization. Some practical skills in MySQL optimization are sorted out. Schema and data type optimization Integers are usually the best choice for identifying columns because they are fast and usableAUTO_INCREMENT A completely “random” string (for example:MD5()、SHA1()perhapsUUID()Will be arbitrarily […]

  • Handwriting algorithm in written test


    As a developer, it is particularly important to have a learning atmosphere and a communication circleMy IOS communication group: 761407670No matter you are Xiaobai or Danio, welcome to join us, share bat, Ali interview questions, interview experience, discuss technology, let’s communicate, learn and grow together! The following is basically implemented in C language 1. Instead […]

  • Array of algorithms — sum of three numbers


    Sum of three numbers difficultysecondary Here is an array of N integersnums, judgmentnumsAre there three elements a, B, C in a such that a + B + C = 0? Please find all triples that satisfy the condition and do not repeat.be careful:The answer cannot contain duplicate triples. Example:Given array nums = [- 1, 0, […]

  • Algorithm | sorting


    Bubble sort By exchange: if the current element is larger than the next, the two elements are exchanged. The largest element in each scan area is in place java code public class Sort_Bubble { public void bubbleSort(int[] arr){ if (arr == null || arr.length<2) return; for(int len = arr.length-1; len>0; len–){ for(int i = 0; […]

  • Insertion sort algorithm


    The insert sort pair divides the array into sorted and unsorted parts. Generally, the left side is sorted and the right side is unsortedThen the first element of the unsorted sequence is taken as the element to be inserted, and then the sorted sequence is traversed,Note that we have to traverse the sorted sequence from […]

  • [greedy algorithm] complete the array as required


    Nums is a positive array of integers and integers. Select any number from the [1, n] interval and add it to nums, so that any number in [1, n] interval can be represented by the sum of some numbers in nums. Please output the minimum number of digits that meet the above requirements. Example 1: […]

  • SQL higher order (window function)


    Window function Window function is also known as OLAP (online analytical processing) function, which means real-time analysis and processing of database data. Window function is in Oracle and SQL serverAlso known as analysis function, window function syntax is as follows < window function > over ([partition by < column list >] Order by < list […]

  • Explain in MySQL


    explainExplain simulates the optimizer to execute SQL statements. In 5.6 and later versions, except for select, others such as insert, update and delete can use explain to view the execution plan, so as to know how MySQL processes SQL statements and analyze the performance bottlenecks of query statements or table structures.effect1. Read order of tables2. […]

  • Datatable common functions


    The new DT is obtained by conditional query and sorting string clumname = “”; string filtcontext = “”; string wherecode = clumname + “='” + filtcontext + “‘”; /// <summary> ///The new DT is obtained by conditional query and sorting /// </summary> ///< param name = “DT” > source DT < / param > ///< […]

  • Python sequence (6) list sorting


      1. Sort method sort original address sort     list.sort(key=None,reverse=False(or True)) When reverse = false: it is a forward sort; When reverse = true: reverse sort. The default is false. 2. Key: sort keyword. The value is a function. This function has only one parameter and returns a value. For example, there is a list of […]

  • A picture is a complete explanation


    Explain keyword can simulate the MySQL optimizer to execute SQL statements, and can analyze the performance bottleneck of SQL statements or table structure. Use of explain 1. What is the reading order of the table 2. What are the types of data reading operations 3. Which indexes can be used 4. Which indexes are actually […]

  • Look at animation algorithm: sort quick sort


    brief introduction Quick sorting also adopts the idea of dividing and dividing. So what’s the difference between quick sort and merge sort? Merge sort is to split all elements into ordered arrays, and then merge these arrays. Although quicksort is also split, the operation after splitting is to select an intermediate node from the array, […]