[rigong's attack on the big factory series] don't jump into the interview trap of ArrayList

background Yesterday, Xiao Feng received an interview call from a company. One of the interview questions was a little interesting. I'll share it with you here. The interview question is how to delete the specified element in ArrayList. At first glance, it sounds like a simple question, but if you don't actually step on the pit, you can easily ...

Posted by Ferenc on Sun, 02 Jan 2022 00:55:53 +0100

Java interview often ask knowledge, understand the sorting algorithm at one time, and summarize the commonly used sorting algorithms

realization public class SelectionSort { public int[] selectionSort(int[] A, int n) { //Record minimum subscript value int min=0; for(int i=0; i<A.length-1;i++){ min = i; //Find the minimum value after the beginning of subscript i for(int j=i+1;j<A.length;j++){ ...

Posted by mikew2 on Sat, 01 Jan 2022 18:42:32 +0100

leetcode_987. Vertical traversal of binary tree -- leetcode's way to brush questions

Title Description Give you the root node of the binary tree, root. Please design an algorithm to calculate the vertical traversal sequence of the binary tree. For each node located in (row, col), its left and right child nodes are located in (row + 1, col - 1) and (row + 1, col + 1). The root node of the tree is located at (0, 0). The ve ...

Posted by Stopofeger on Sat, 01 Jan 2022 16:28:42 +0100

[interview] sorting out common interview questions in C + +

What is the difference between the declaration and definition of variables The definition of a variable allocates address and storage space for the variable, and the declaration of a variable does not allocate address. A variable can be declared in multiple places, But only in one place. join extern Modified is the declaration of a variable, ...

Posted by tron00 on Sat, 01 Jan 2022 04:26:06 +0100

Java foundation summary III (generics, interview java engineer)

public float refund(E item) { return 0; } } FruitShop fruitShop = new FruitShop<>(); // This shop sells apples FruitShop stringShop = new FruitShop<>(); // This fruit shop sells mobile phones??? Of course not logical Because of our store generics E If there is no restriction, it will lead to mistakes. Let's put restr ...

Posted by TalonFinsky on Fri, 31 Dec 2021 12:07:20 +0100

Written interview for Java senior programmer, MySQL specification and performance optimization

**「reason:」** * Primary keys are usually added. Tables without primary keys have no soul * It is recommended to add the creation time and update time. Detailed audit and tracking records are useful. Ali's development manual also mentions this point, as shown in the figure ![](https://img-blog.csdnimg.cn/2020121620 ...

Posted by sriphp on Thu, 30 Dec 2021 23:34:46 +0100

[hematemesis finishing, what is JWT -- JSON WEB TOKEN

3,CSRF Because user identification is based on cookies, if cookies are intercepted, users will be vulnerable to cross site request forgery attacks. 5, Authentication mechanism based on token The token based authentication mechanism is similar to http protocol and is stateless. It does not need to retain the user's authentication informatio ...

Posted by rawky on Thu, 30 Dec 2021 15:26:29 +0100

AOP programming_ The conceptual basis of Android's elegant permission framework almost missed the Offer

Starting today, we will open up a new topic: professional skills of mobile architects in simple terms, with the goal of becoming an architect step by step, detailing the most direct use value of an architect's skills, horizontal peripheral knowledge and in-depth professional technology The most direct use value: I'm most afraid to see an arti ...

Posted by brailleschool on Thu, 30 Dec 2021 14:03:23 +0100

The seventh part of java basic syntax in the basic part of Java interview: abstract classes and interfaces are necessary for large factories

1. Abstract class rule of grammar Role of abstract classes 2. Interface rule of grammar Implement multiple interfaces Inheritance between interfaces Clonable interface and deep copy Shallow copy VS deep copy summary 1. Abstract class ======= rule of grammar There is no actual working method. We can design it as an abstract method ...

Posted by nmarisco on Thu, 30 Dec 2021 11:55:00 +0100

Detailed explanation of two persistence mechanisms in Redis, advanced Java

The client can also use the SAVE command to create a snapshot. The Redis server that receives the SAVE command will not respond to any other commands before the snapshot is created; Note: the SAVE command is not commonly used. Before the snapshot is created, Redis is blocked and cannot provide external services. 3. Configuration snapshot t ...

Posted by joviyach on Thu, 30 Dec 2021 08:58:35 +0100