Explain knapsack problem in depth: one of every five dynamic programming in the interview is knapsack model

❝ Author: Gong Shui Sanye. Now Microsoft engineer (Java back-end direction), retired OIer. For more information about the interview algorithm, click here "Attention~ Reprint should pay attention to the official account contact list. ❞ preface How to reduce the complexity of knapsack space from $o to $0 (c) $. On the basis of ...

Posted by fuzzy1 on Mon, 18 Apr 2022 19:48:47 +0300

Don't build wheels again. This open source tool class library is easy to use

Hutool is a small and comprehensive Java tool class library, which helps us simplify every line of code and avoid repeated wheel building. If you need to use some tools, you might as well look in hutool. This paper summarizes 16 commonly used tool classes, hoping to help you! install The installation of Hutool is very simple. In Maven proje ...

Posted by bulldorc on Mon, 18 Apr 2022 14:40:19 +0300

Prove your ability through factory mode in the interview

During the interview, candidates are often asked, what design patterns have you used in the project? In this regard, you can systematically demonstrate your ability in design ideas through factory mode according to the steps given in this article. 1 create details through factory mode masking Factory Method is used to mask the details of creati ...

Posted by marco839 on Mon, 18 Apr 2022 04:06:22 +0300

How to handle repeated (concurrent) requests gracefully?

In some cases, some user requests may be sent repeatedly. If it is a query operation, it will not be a big problem, but some of them involve write operations. Once repeated, it may lead to serious consequences. For example, the transaction interface may place repeated orders if repeated requests. Repeated scenarios may be: The hacker inter ...

Posted by pp4sale on Sun, 17 Apr 2022 01:11:51 +0300

What is the difference between Exception and Error

    Basic concepts First of all, Exception and Error are inherited from Throwable class. In Java, only instances of Throwable type can be thrown or caught. It is the basic component type of Exception handling mechanism. Exception and Error embody the two ways of exception handling in JAVA. Exception is an unexpected exception in the runnin ...

Posted by darrensw on Sat, 16 Apr 2022 02:23:37 +0300

The interviewer was asked why Java serialization and deserialization should implement the Serializable interface

Recently, the company is doing service-oriented. It needs to implement the Serializable interface for all classes in the model package, and display the value of the specified serialVersionUID at the same time When I heard this demand, several questions suddenly appeared in my mind, such as: (1) What are serialization and deserializati ...

Posted by JAB Creations on Fri, 15 Apr 2022 18:34:04 +0300

50 classic SQL interview questions

50 classic SQL interview questions (Part 1) Recently, I found this set of classic SQL interview questions when collecting SQL daily questions. I combed it again according to the questions, including table structure, relationship between tables, test data, questions, reference answers, etc. Most of the reference answers are common on various dat ...

Posted by jonybhi on Thu, 14 Apr 2022 19:57:36 +0300

Java network programming - UDP communication principle (super detailed analysis, you can understand it at a glance!!!)

preface Continue today's Java Network Programming -- TCP and UDP communication 1, TCP and UDP overview The transport layer usually uses TCP and UDP protocols to control the communication between endpoints TCPUDPAgreement nameTransmission control protocolUser packet protocolConnectedConnection oriented protocol. Data must be connectedFor ...

Posted by Rangel on Thu, 14 Apr 2022 13:33:37 +0300

I'll give you a pile of tasks to complete. Can you finish all the tasks on time?

I'll give you a pile of tasks to complete. Can you finish all the tasks on time? Tip: interview questions before Huawei 202204 It is similar to arranging meetings, waiting in line to finish washing, waiting in line to make coffee and other problems to test the skilled use of small root piles subject Give you an N*2 array arr, which re ...

Posted by neville on Wed, 13 Apr 2022 18:31:40 +0300

[interview] Lambda expression of new features of java8

This series is the relevant notes of the interview questions series of large factories. If there is any error, you are welcome to correct it. Lambda expression Why use Lambda expressions Lambda is an anonymous function. We can understand lambda expression as a piece of code that can be passed, and pass the code like data. In this way, we c ...

Posted by leonglass on Wed, 13 Apr 2022 16:13:16 +0300