How much do you know about HashMap

HashMap is almost the knowledge that must be asked in an interview. Can you really take it easy for an interview with HashMap? I believe that if you go to an interview with a famous Internet company, you will never just ask such a simple question as the data structure of HashMap. I collected several questions that the boss often asked about Ha ...

Posted by renesis on Wed, 04 Dec 2019 15:04:47 -0800

Learning note 11 - minimum number of rotation array

Title: move the first several elements of an array to the end of the array, which we call array rotation. Input a rotation of an increasing sort array, and output the minimum elements of the rotation array. For example, array {3, 4, 5, 1, 2} is a rotation of {1, 2, 3, 4, 5} and the minimum value of the array is 1. Idea: using bi ...

Posted by jlive on Wed, 04 Dec 2019 13:04:10 -0800

React 1.6 adds support for sass and less

Add sass and less support in the new version of react respectively. Note that the project is created with the create react app scaffold tool. Add sass support Adding sass support is very simple. You only need to execute the following command to install node sass. If it does not take effect, please restart the project. npm i node-sass --save Ad ...

Posted by rasherb on Wed, 04 Dec 2019 05:36:20 -0800

Increasing ternary subsequence

Given an unsorted array, determine whether there is an increasing subsequence of length 3 in this array. The mathematical expression is as follows: If there is such an i, j, k, and satisfies 0 ≤i <j <k < n-1, Make arr[i] < arr[j] < arr[k], return true; otherwise, return false. Note: the time complexity and space ...

Posted by SensualSandwich on Wed, 04 Dec 2019 03:10:56 -0800

Technology sharing | thinking about MySQL show processlist with negative time

Author: Gao Peng At the end of the article, there is his book "in-depth understanding of MySQL master-slave principle 32", in-depth understanding of MySQL master-slave, GTID related technical knowledge. I. source of problems This is a question that a friend asked me. The question is as follows: what happens when the Worker thread s ...

Posted by Wildthrust on Tue, 03 Dec 2019 23:20:10 -0800

About how to keep decimal calculation function in js development (keep decimal by rounding up or down)

In front-end work, we often encounter the problem of keeping decimal in number calculation. Because the toFixed function can't be used instead of rounding, this paper uses the method of regular expression matching string to solve the problem of keeping decimal in number up or down: 1. Keep the decimal up (enter 1 as long as there is a signific ...

Posted by zurron on Tue, 03 Dec 2019 20:49:26 -0800

Clock in the third week: A-merge sort & heap sort

Merge sort The classical divide and conquer strategy is used in merging and sorting. Divide an array into half parts all the time, and the scale of the problem will be reduced. Repeat the process until the number of elements is one, and one element will be arranged in order. Next, merge two elements and four elements in order. ...

Posted by musclehead on Tue, 03 Dec 2019 20:39:33 -0800

Star rating of jQuery cases

Let's take a look at the effect:Code part:html: <body> <ul class="comment"> <li>☆</li> <li>☆</li> <li>☆</li> <li>☆</li> <li>☆</li> </ul> </body> css <style> * { padding: 0; margin: 0; ...

Posted by articlesocial on Tue, 03 Dec 2019 17:20:25 -0800

PHP 2D array sorting keeps the key name unchanged

To sort the key names assigned to a two-dimensional array, the first thing you think about is the array? Multisort function. I wrote about the use of array? Multisort before An articleThere is not much nonsense. Let's take an example: <?php $data = array( 1001 => array( 'age' => 22, 'name' => 'Jiu Mo Zhi' ), ...

Posted by wanda46 on Tue, 03 Dec 2019 10:28:03 -0800

java version of personal income tax calculation

The year is coming. It's time to give out the year-end bonus. So I went to the Internet to find the personal tax calculator, but I found it was a little like a virus website. So the result of calculation is not very dare to believe, so ponder, or write a personal income tax calculator by yourself. First, I went to the State Administration of T ...

Posted by lapith on Mon, 02 Dec 2019 23:05:26 -0800