Java back-end technology interview summary (the third set)

1, basic questions

• Hash how to resolve conflict; (opening address method, chain address law, then hashing, such as the establishment of a common overflow area)
• write a pseudo code would have a deadlock;
• relate to the Spring IoC design pattern; (factory mode, mode .. simple interest)
under what circumstances • toString () method needs to be rewritten;
• when the determination is equal to the object, only under what circumstances override the equals (), under what circumstances need to rewrite equals (), hashcode () ?
Why put • Set memory elements can not be repeated, and how internal assurance is achieved?
• How to ensure a distributed cache coherency (distributed cache coherency hash algorithm?)? Distributed session achieve?
• Java benefits of 8-flow iteration?
• What are the characteristics used in the project of the JDK?
• TreeMap talk about the realization of the principle? Nature of the red-black tree? Red-black tree traversal options? What happens if key conflict resolution? setColor () method used at what time? When will rotate and color conversion?
• Spring is the time to create the bean? Dependency injection timing?
Delete • ArrayList and LinkList of a time element of complexity; (ArrayList is O (N), LinkList is O (1));
What • CopyOnWriteArrayList is;
• How serialization and de-serialization of the underlying implementation (ObjectOutputStream, ObjectInputStream, writeObject readObject);
• how to debug multithreaded programs;
• a thread attached to invoke start twice what happens? (Only because the state is ready, blocking, execution, execution by the state is unable to perform the conversion, it will be reported illegal state!)
• HashMap at what time time complexity is O (1), what time is O (n), what time is O (logN);
• the wait method can not be overridden? (Wait is final and can not be rewritten, not only that, notify notifyall are final and type), wait can be interrupted;
• a call two Service Controller, Service and two are respectively two calls Dao and asked which uses several connected database connection pool?

2, network infrastructure

• HTTP, TCP, UDP differences and connections;
• TCP and UDP their strengths, know which use UDP protocol success stories;
• TCP and UDP each with underlying any agreement;
• a single UDP packet maximum capacity;
• a single TCP the maximum capacity of the message;
• TCP header format, UDP header format;
• Server suffered SYN Flood should be how to deal with;
• Web developers in how to prevent XSS?
• unpacking and stick package of problems, how to solve, if we have not fixed packet length, then our application how to solve;

3, the operating system

• Why is aligned memory;
• Why the big end of the small end, htol role of this class of functions;
• Top displays system information is what meaning; (important!)
• Linux address space, how about addressing the ;
• how to find Linux directories or files;

4, other distributed

• sub-library distributed with the plight of sub brings to the table and countermeasures;
how to implement • Solr index updates 24 hours a day;

5, Redis

• Redis dispensing slot (effective key portion using CRC16 algorithm to calculate the hash value, then the hash value modulo 16384, the value obtained slot);
• Redis from how the selected master (one is active switching the other is the use of sentinel automatic mode);
process • Redis replication;
• Redis queue scenarios;
• Redis master node goes down how to do, there is no how to do data synchronization;

6, system design open topic

• spike design of the system, how do oversold;
how stored • your picture, how to save information when the corresponding picture in the database?
• If a fire station in Chengdu did not ask you now to build several fire stations, fire stations each with a number of fire officers and soldiers to be, how many fire engines, would you please come up with a plan;
• achieve a cycle based on an array of blocking queue;
• show common form of ipv4 addresses such as "168.0.0.1", please realize the transformation ip address and type int. (Using the displacement mode)
• an existing network services deployed on multiple servers Liunx, in which a 100% CPU situation suddenly appear, while other servers properly, please list may cause this to happen? If you encounter such a situation, how to locate? RAM? CPU? release? debug? Requested amount?

7, a large amount of data issues (thematic discussion back there alone)

• Given a, b two files, each storing 5 billion url, url each accounted for 64 bytes each, the memory limit is 4G, let you find out a, common url b file?
• massive log data to extract most of the day to visit a number of Baidu that IP;
• a text file, about one million lines, one word per line, requires the statistics of the top 10 words most frequently occurring, please give thought given time complexity analysis.
This topic will be a special article explores behind, if there is a small partner can not wait, can refer to the venue:
1, HTTPS: //blog.csdn.net/v_july _...
2, https://blog.csdn.net / v_july _...

8, logical thinking title

• There are two uniform thickness of incense (incense burning incense and pray), every burn spent an hour, how to be able to get 15min?
• Suppose you have eight pool, which has a slightly heavier ball than the other ball, if we can only use the balance to determine which one heavy ball, to find the heavier ball, to be called several times (2);?
• Experiment 1000 room has exactly the same bottle, but the bottle in which toxic. You can use laboratory mice to test which of a bottle of poison. If the mice drank poison, it will be dead in a week's time, the other a bottle of medicine without any side effects. I ask only the minimum number of mice used in less than one week you can find out which bottle is poison; (The answer is 10)
• Suppose there is a pond, there are an infinite number of water. Two existing empty bottle, were of 5 liters volume and 6 liters. The question is how these two kettle only get three liters of water from the pond;

5-》6 6差1满
5-》6 6满5剩4
6倒掉,5剩4倒入6,6差2满,5取满倒入6,5剩3

Guess you like

Origin www.cnblogs.com/Java-Script/p/11095115.html