Sword finger offer array topic summary (necessary for interview)
Sword finger offer array topic summary (C + + version)
1. Duplicate number in array All numbers in an array num of length n are in the range of 0 ~ n-1. Some numbers in the array are repeated, but I don't know how many numbers are repeated, or how many times each number is repeated. Find any duplicate number in the array. Idea 1: sort first ...
Posted by j115 on Thu, 04 Nov 2021 19:06:44 -0700
Interviewer: optimize Fibonacci function with "tail recursion"
1 PrefaceProgramming problem: input an integer n and output the nth item of Fibonacci sequenceSome interviewers like to ask this question. Maybe you think it's too simple. It can be realized at once by recursion or recursion.Just when you are full of confidence and realize it in two waysInterviewer: now please optimize your recursive implementa ...
Posted by programming_passion on Thu, 04 Nov 2021 11:09:32 -0700
Junior students are dissatisfied with the meituan internship. They switch to the headlines and find out six customs clearance experience, Java post
Today, I'd like to share with you the interview process of a friend who went to today's headlines (a junior undergraduate student who is currently interning in meituan).
The following is his journey, which is divided into six links:
If you want to climb the peak, don't use the rainbow as a ladder.
1. Self introduction
After a brief ...
Posted by sKunKbad on Thu, 04 Nov 2021 03:57:16 -0700
Find the k-th largest number of two ordered arrays
Title: give two one-dimensional int arrays a and B. where: A is an ordered array with length m and elements in good order from small to large. B is an ordered array with length n and elements arranged from small to large. We hope to find the maximum k numbers from the A and B arrays. It is required to use as few comparisons as possible.
Soluti ...
Posted by ossi69 on Wed, 03 Nov 2021 22:27:41 -0700
Factory Mode--The Evolution of Cat Grain Plant
The Birth of Cat Food Company
Gyroscope is a program. It started its own company. In order to commemorate the years when dream was born, the company named "Running Yard" and its main business is cat food production.
A Miao that takes R&D and operations into account is not a long-term solution. So I hired a vegetable mew to be an ...
Posted by Joshua4550 on Wed, 03 Nov 2021 09:16:38 -0700
Java interview sorting
1, Jingdong interview questions
1. Implementation principle of @ Autowired
1. Injection method:
1. Constructor based dependency injection
public class UserServiceImpl implents UserService{
private UserDao userDao;
@Autowire
public UserServiceImpl(UserDao userDao){
this.userDao = ...
Posted by donkru on Tue, 02 Nov 2021 04:50:34 -0700
java -- a collection of high concurrency programming of JUC, which is necessary for large factories
1 what is JUC
1.1 introduction to JUC
In Java, the thread part is a key point. The JUC mentioned in this article is also about threads. JUC is short for Java. Util. Concurrent toolkit. This is a toolkit for processing threads. JDK 1.5 began to appear.
1.2 processes and threads
Process is a running activity of a computer program on a data s ...
Posted by sockit2em on Mon, 01 Nov 2021 16:45:35 -0700
Special class design, singleton mode
catalogue
1, Please design a class that can only create objects on the heap
2, Designing a class can only create objects on the stack
3, Design a class that cannot be copied
4, Designing a class cannot be inherited
5, When designing a class, only one object can be instantiated
five point one The singlet ...
Posted by jhenary on Sat, 30 Oct 2021 21:30:46 -0700
Why does Ali have to ask Redis for an interview? Alibaba architect's Redis distributed lock actual combat sharing
1, What is a distributed lock?
We all know the concept of lock when learning Java, such as synchronized lock based on JVM implementation and a set of code level locking mechanism lock provided by jdk. We often use these two locks in concurrent programming to ensure the correctness of code running in multi-threaded environment. However, these l ...
Posted by DJ Judas on Sat, 30 Oct 2021 11:10:29 -0700
Basic part: JAVA collection, special for interview
There's nothing to say. Everyone here is beautiful
List array
Vector vector
Stack stack
Map mapping dictionary
Set set
Queue queue
Deque bidirectional queue
Pay attention to the official account and exchange with each other. Search by WeChat: Sneak ahead.
General method of general queue
Operation method
Throw exception
Blocking thread
Re ...
Posted by mephistoo on Sat, 30 Oct 2021 01:54:56 -0700