当前位置:网站首页>Interview summary of some large factories
Interview summary of some large factories
2022-07-26 18:42:00 【Uncle Wang who wrote the program】
Home page : The blog of Uncle Wang who wrote the program welcome Visit
Support : give the thumbs-up
Collection
Focus on
Community :JAVA Full stack advanced learning community welcome Join in
Catalog
Four 、 sound of dripping water
One 、 headlines Java

【1】
one side 、
Java Multithreading Create thread 、 Thread pool 、 lock (synchroized、reentrantlock etc. )、volatile Function and principle 、atomic principle 、CountDownLatch Act on the principle ( This uses less , Bad answer )
Algorithm problem Breadth first traversal print binary tree , One layer at a time ( Return to the first floor ), Place commas between nodes in each layer ( There is a comma after the node , Except the last one on each floor ).
When answering the lock, I added it myself redis、mysql、zookeeper Implement distributed locks
Two sides 、
Programming to solve : After the decimal point 30 position , seek 3/7 Result .( The boundary conditions are not perfect 、 The algorithm is questioned 31/71 The situation does not apply , But I didn't see the problem on the spot , I came back and tried. There's no problem , Compared with the calculator , Rounding does not take into account , The boundary conditions are indeed a little less )
The process of quick sorting , Roughly describe the process
Find a data in an ordered array , Ordered matrix ? Ordered Cube ?( I've been using dichotomy to apply , I'm not sure if there's a better way )
Others, such as what you did at school 、 What did you do in your previous company 、 Why quit .
Expect to learn something in , What do you think of language .
What do you usually do ? What do you do at work ?
On three sides 、
How to realize a general function of counting the number of visits ,
answer :Redis Realization 、key It can be by the Department 、 Prefix of the system + Business id form ,value It's the number of visits .
If the same user visits repeatedly, why not repeat the record ?
If the amount of data is large 、 How to deal with a lot of historical data
answer :mysql Save the data ,redis When caching , By the way redis The principle of data expiration
If the data structure changes greatly .
answer :mongodb Replace mysql, Then I compared the next two engines , also mysql innodb How to lock and so on
How to design a time limit ?
How to design peak current limiter ?
How to realize the separation of front and rear ends ?
Jvm gc Related issues ,gc Time of occurrence ,gc object , In heap space division ,gc The algorithm remembers everything .
And see how to view online gc situation open gc journal 、 jstat -gc command
【2】
one side
java What are the parameters of thread pool , Specific meaning . I explained it in combination with the project I did .
What are the problems with thread synchronization , How to solve . I put the lock , The queue and the underlying principle are explained in detail
voliate principle ,java The queue principle
How to determine the number of threads
mysql Index principle ,mysql Types of things . Fantasy reading , How can I solve it if I can't repeat it
Introduce in detail the system you mainly developed , Problems encountered , How to solve
Two sides
Talk about the system architecture of your business department , How the modules communicate
Write a sql
surface 1 Student id, fraction
surface 2 Student id, name
Find the only score ( No repetition ) The student's name
Two 、 Tiktok Java

【1】
1 Noodles . 1. Introduce the project ? How do you implement distributed transactions in your project ? How is the state machine implemented ?
2. CMS and G1 What's the difference? ? Which one do you use now ? What advantages does he have over
3. ConcurrentHashMap Have you seen ? Which version of ?JDK 7 How to achieve in ? Will it be locked when reading ?
4. Read about AQS Do you ? Tell me how it works ? What advantages does it have over native locks ?synchronized What are the optimizations ?
5. kafka Understand? ? Under the said kafka Let's have a better structure ? How copies are copied ?leader How did you vote when you hung up ?
6. Know what a clustered index is ?InnoDB Page structure of ? Why B+ No trees B Trees ? Know about clearance locks ? Under what circumstances will you use next-key lock?
7. Algorithm : A single linked list , Odd bit ascending , Even bits in descending order , There is no relationship between parity bits , Write an algorithm , Into ascending order
2 Noodles :
1. Redis Understand? ? What data structures are there ?
2. Redis If you don't use jump tables and compressed lists for ordered sets , What other data structures can you think of ? Your data structure getRankByScore How to achieve , What's the complexity of time ?
3. thrift RPC principle ? You this thrift mock Server principle ? Why not client mock, What's wrong with it ?
4. Have you ever done anything on stability ?( Server side : Current limiting 、 cache 、 Trouble shooting , client : asynchronous 、 Fuse )
5. What do you use to limit current ? How to implement cluster current limiting ?QPS How to count ?
6. Can you tell me the principle of fusing ? When does the fuse switch turn off ?
7. Do you understand the fault drill ? How to achieve ?
8. Algorithm : Two single linked lists represent two large numbers , The head node is the highest bit , Returns the linked list of the sum of two linked lists
3 Noodles
3.InnoDB How transactions are implemented (ACID :redolog/undolog/ lock /double write)
4. Can isolation be achieved only with locks ?MVCC How to achieve ?
5. Have you ever encountered heat key problem ? How to solve ?
【2】
1 Noodles
hashmap How to achieve . What kind of capacity expansion mechanism is used , Why use such expansion wit
java Memory structure what , What's in the stack , Stack operation of a simple function , What's in the pile , Why is it designed this way? . Recovery algorithm .
Contract issuance , visibility , Lock level ,lock synchronized difference , What situation to use .lock How to realize the lock . How to realize read-write lock .
Algorithm , Linked list questions
2 Noodles
database structure , How does the index work .
acid What is it? ,innodb How? repeat read, Fantasy reading .
redis map What data structure is used , What are the benefits . How do you design .
Algorithm , Binary tree into a two-way linked list .
3 Noodles
Introduce the project
How to solve the conflict between product and R & D
How to understand the airline ticket industry , What is the core
Algorithm , Binary tree breadth first snake traversal
notes : With the answer , Also asked some details , For example, I answered , There are local variables in the stack 、 Enter the reference . The interviewer will ask where the multi-threaded member variables are placed ? All in one stack ? Multiple stacks ? What is the relationship between thread local stack and stack in memory model ?
3、 ... and 、 Well quickly


Mainly focused on java Basics ,mysql Database Basics , Network communication protocol ,zookeeper Relevant practice, etc .
Related technical issues :
1.mysql? Primary key ? And general index ? difference .?
2. Service interaction within the company ?
3.zookeeper Relevant experience ?
4.HashMap?
Underlying data structure ?
5. design scheme : Get orders within three months , Users who have no orders in a month
6. Database lock level 、 Optimism lock
7. use Java Realization redis Of get/incr Functions, etc
Commercialization Department , Advertising group Java
one side : Project oriented
1. Personal introduction
3.redis and tair The difference between ?
4. Whether there is a scheme considering cold and heat data
5. Algorithm problem :a*b*c*d, Just consider the law of Association , Do not consider exchange , How many calculation methods are there ?
Such as a*b*(c*d), a*(b*c)*d
6. This paper introduces the organizational structure of the advertising group
Two sides : Basic knowledge
1. Personal introduction
2.zab The advantages and disadvantages of the agreement ?
3.mysql Data isolation level ?
4.https Principle ?
5.tcp Why can't four handshakes be three ?
6. on-line time wait There are many connections in the State , How to deal with it ?
7. How short links are implemented ?
8. What are the distributed consistency algorithms
9. Algorithm problem :1. Determine whether a string is a substring of another string
10. A bunch of unordered integers , Find the sum of two numbers as n Two integers of .
Four 、 sound of dripping water


Basic technical problems
volatile effect
countdownlatch, cyclebarrier difference
concurrenthashmap principle , Why? get It can guarantee to obtain the latest value
mysql Classification of locks
threadlocal Understand? , purpose 、 Realization principle
Rpc What do you use , How service discovery works
kafka:topic What is it? , Multiple consumer consumption logic
http Interface idempotence
jvm Memory model ( Which areas of memory are divided into )
Garbage collector 、 Algorithm
Online problem diagnosis tricks
Online machine cpu idle Drop the bottom , The memory is full ( Check that memory is recyclable ), What could be the problem ?
Algorithm & Programming questions
Two threads , One prints only odd numbers , The other prints only even numbers , How to type in order 1,2,3,4,5,6...
No k Small numbers
3 Noodles
Interview questions :
1、 Binary tree delete node
2、 This project you did , How can you show your technical points in modules ( I understand this is such a problem , The interviewer didn't make it clear )
3、 Career planning
4、 Didi subsidy , What kind of people will receive results , How much is the subsidy , How to compare the specific effect with that before the transformation
5、 Internationalization business , How or how do you think it can be realized
5、 ... and 、 Are you hungry

Candidate one :
mysql The optimization of the
Message queue
Distributed transactions
Database master slave
zk Transaction mechanism of
Micro service
Candidate two :
redis Memory principle of
lru Algorithm
Candidate three :
hashmap Source code
Implementation principle of thread safety lock
mysql Optimize Message queue
Garbage collector And collection algorithms
nio and bio The difference between
jvm tuning
Design of seckill system
Candidate four
1.redis Memory structure ,redis Persistence scheme , How to solve various solutions to the problem of final data consistency ;
2. Module or system request chain , How to ensure that the processing is either completed , Or roll back ;
3. Distributed lock ;
4. Message queue ,rabbitMQ;
5.redis Horizontal expansion scheme of cluster ;
6. soa Service design ;
7. Multithreading problem ; These are the big modules The rest are details
6、 ... and 、 shell

one side
1. Introduce yourself briefly
2. Please find one of the most difficult projects you have ever done , Introduce the most technical content .
3.JVM Understand what the principles are ?
4. introduce ZK The selection mechanism of .
5. In a distributed situation , How to generate globally unique with business significance id?
6. Introduce the concept of microservice , How to achieve ?
Two sides
1. Design database tables according to requirements .
2. Then according to the designed table , Write sql, Show the items that the current user can apply for ( Those who have already applied cannot be re
apply ).
3. I want to introduce this design to students now , How to tell them , What are the points of attention
On three sides
1.JVM Memory practical problem : Two threads execute simultaneously for Cyclic i++, Without any synchronization ,i May appear
What is the minimum value of ?
2. Work with PM What problems will there be in communication .
3. When leading a team , What's the biggest challenge ?
7、 ... and 、KEEP


Algorithm problem
1. Find the nearest public parent node of the binary tree use set
2. Calculate embedded list Weighted sum of Relatively simple
3. Look for a distance from the specified point p Closest n A little bit ,p and n Fix . Use the largest heap .
4. Given an unordered sequence and a specified value a, Find the sum of two elements in the sequence equal to a All combinations of . Use map Find out if the difference exists . If it's an ordered sequence , Use two pointers to point to the start and end elements respectively , Calculate the sum of the two , If you compare a Move from high to low , If it is less than a Move from low to high
5. Given an array of values , There are positive and negative numbers , Find the maximum continuous sum . Design another array , Store the sum of the largest subsequence corresponding to the original array , The value of the current position is compared with the maximum sum of the previous position plus the sum of the current value , Taking the maximum .
6. Design LRU Cache. Recently used cache . Double linked list +hashmap. hashmap Realize the reading of o(1), The head node of the two-way linked list prevents the latest , Put the latest one at the front after each reading . When deleting, directly delete the last , Again o(1).
Architecture design problem
1 A large server cluster ( Ten thousand units ), Each server will generate different types of exceptions . There is a monitoring interface , Show 24 The first with the largest number of exceptions in an hour 100 There are two exception types ,5 Seconds to update .
Ideas : redis, The key value is an exception type + Time scale , Time scale 5s once . such as nonepointer-20180101080005;key The failure time of the system is 24 Hours . Use incr Incremental mode . At every containor Add a statistics module locally ,5 Update the current... Every second containor Information about . Then count redis The sum of counts of the same type in .
️ Be careful ~
This issue is over , If The content is wrong , Please The comment area indicates !
if there be doubt Can be in Comment area or Private message , Try my best *️ Help you solve !
If my article has help To you , welcome Reward ️ encourage Blogger , Your encouragement is my motivation to share ~

边栏推荐
- ALV screen input option learning
- Accused of excessive patent licensing fees! The U.S. Court ruled that Qualcomm violated the antitrust law: Qualcomm's share price fell 10.86%!
- Still using xshell? Recommend this more modern terminal connection tool
- 同步时现实密码不匹配
- [a little knowledge] thread pool
- 复现gallerycms字符长度限制短域名绕过
- The first day of Oracle (review and sort out the common knowledge points of development)
- Redis持久化RDB/AOF
- The pit of mpc5744p reports an error, RTOS cannot be started, and there is a clock source problem
- 还在用Xshell?推荐这个更现代的终端连接工具
猜你喜欢

SSM practice day 5

链表-倒数最后k个结点

ssm练习第四天_获取用户名_用户退出_用户crud_密码加密_角色_权限

Privacy computing basic component series - confusion circuit

Have you ever encountered a deadlock problem in MySQL? How did you solve it?

Meta Cambria手柄曝光,主动追踪+多触觉回馈方案

Linked list - the first common node of two linked lists

Offer set (1)

Meta Cambria handle exposure, active tracking + multi tactile feedback scheme

Oracle第二天(视图、索引、plsql、游标、存储过程和存储函数、触发器、jdbc访问存储过程和存储函数)
随机推荐
Real passwords do not match during synchronization
likeshop外卖点餐系统开源啦100%开源无加密
[a little knowledge] thread pool
如何做好测试用例设计
Flask 封装七牛云
PS_1_认识主界面_新建文档(分辨率)_打开保存(序列动画)
Redis持久化RDB/AOF
Oracle第一天(开发常用的知识点再回顾整理下)
Linked list - merge two sorted lists
Accused of excessive patent licensing fees! The U.S. Court ruled that Qualcomm violated the antitrust law: Qualcomm's share price fell 10.86%!
Pyqt5 rapid development and practice 3.5 menu bar and toolbar
14. Gradient detection, random initialization, neural network Summary
开发winform中遇到的一些问题汇总(持续跟新)
The faith of circle justice
[ Kitex 源码解读 ] 服务发现
J9 number theory: how to avoid the trap of stepping on thunder?
NFT数字藏品开发:数字藏品助力企业发展
MPLS实验
Redis core principles
How about the employment prospects of Russian translation? How to do a good job of Russian translation