An overview of the

I feel that time flies after graduation. It has been nearly two years since I graduated from my bachelor’s degree in July, 2019 and entered the company. I was thinking about finding a new job during my jin SAN Yin Si period, and I spent more than a month reviewing and interviewing several big companies before I finally chose Tencent. I also wish you want to find a job students can go to their favorite company!

I do not recommend frequent job-hopping, unless forced to, frequent job-hopping will not only become a fear of the interviewer, it will not help their precipitation.

At the same time, I don’t recommend quitting naked because there are too many uncertainties. If the interview goes on too long, you have no financial income for this event, but you are still paying expenses (rent, daily living expenses). This will create invisible pressure, and if the interview is frustrated, it is easy to lose confidence, and even doubt their ability.

But resignation also has his advantages, because some companies may be very urgent project, need to quickly post, then you leave the handover process will delay some time, so will also become a factor for the interviewer to consider. So still want to combine oneself circumstance and decide.

Side (1 h)

  • To introduce myself
  • Ask for details of the project, optimization plan, etc
  • SurfaceView, TextureView and View. How does the SurfaceView control its hierarchy
  • Binder workflow
  • Introduce MVC, MVP, MVVM, which one do you use in your project?
  • Understanding of componentization, how do you achieve componentization? What are the problems with functional modules referencing each other?
  • Memory optimization tools, LeakCanary and MAT principles
  • JVM memory model
  • Java synchronization is volatile and syncronized
  • Different from HashTable, ConcurrentHashMap segment locking principle
  • Front, middle and back traversal of a binary tree
  • Algorithm: Determine if a tree is a balanced binary tree
  • Algorithm: Given a linked list L1, L2, each element is a positive integer within 10, the linked list represents a number, the head of the list is high. Find the difference between two linked lists and return them as linked lists
  • What are some differences between Java and Kotlin? What are Kotlin’s weaknesses?
  • The difference between SurfaceView and TextureView?
  • What do you know about plug-in implementations?
  • Tell us about ARouter’s principle
  • How to implement the intercall interface between two business component modules?
  • Let you design a download function, to achieve multiple large files download at the same time, what to consider (breakpoint continuation)?
  • Do you have experience in audio and video development?
  • What about memory leaks? Strong references Weak references? LeakCanary explains the principle.

The second interview (1 h)

  • Are you more familiar with Java or Kotlin
  • HashMap capacity expansion mechanism
  • Java Volatile principles and functions
  • Optimistic lock, pessimistic lock difference
  • How the thread pool works, what each parameter does
  • What is Android 3 cache? Why we need it
  • Describe a business development project that has been challenging
  • There are some more general Android issues that I can’t recall
  • Algorithm problem: find the KTH – last node in a single – linked list. After finishing the interview, the interviewer asks if you have brushed this question, so I will write another one…
  • Given an 8-core mobile phone, design a program to quickly retrieve all files named A under sdcard and return a list

Three sides (1.5 h)

  • The main deep digging project details, some not quite clear better not to mention, or be dug to very embarrassing
  • How do you learn technology
  • Were you satisfied with your growth at your previous company
  • Which companies are you talking to and how are things going

The interview summary

Graduation choice is a not a line of giant company, working here nearly two years, a lot of amateur study Android related professional knowledge (because not busy), but due to the business, and company development has been in decline, I on the project experience is lacking, so consider into a giant continue to hone sharpening.

My interview is not many, but also let me know, my own shortcomings, know oneself this aspect is very weak in the data structure and algorithm, at the same time, the problems in the development summary, Java, basic and advanced knowledge is insufficient, the source code to read in-depth, to master the knowledge very empty, without understanding to the key, but only in the framework of stay will use phase. Weak knowledge of network. Weak background development process and knowledge (all the logic and difficulties are actually in the background, and understanding the background is also helpful for Android development and interface debugging collaboration). These are my future learning direction.

Summary of High-frequency knowledge points

Knowledge points Tencent encountered, there are other companies encountered interview, I have done a collation. It should be noted that this is not the whole knowledge system, but only the interview questions encountered by the author. Readers can follow the general direction to learn, but must not think that this is enough, the knowledge points mentioned here are far from enough.

In the process of interview, knowledge points will not be simply investigated, but will be combined with some requirements or business scenarios to investigate the understanding of knowledge points in many aspects. Therefore, the author suggests that knowledge points should be the first task to understand, rather than recite answers.

In the process of interview, knowledge points will not be simply investigated, but will be combined with some requirements or business scenarios to investigate the understanding of knowledge points in many aspects. Therefore, the author suggests that knowledge points should be the first task to understand, rather than recite answers.

Android

1.Activity

1. Start the Activity process. One of the most looked at similar questions was: “What happens when you click an icon on the desktop and go to the screen?” . Many times interviewers will use the activity lifecycle to ask: at what stage of the startup process which lifecycle is called back, and what is the state of the activity at that time. 2. Start mode. These are the four common priming modes, but interviewers prefer to ask when to use them, which is the usage scenario. 3. Life cycle. This is rarely asked in isolation, but in conjunction with the startup process or specific business scenarios. 4. The context. It is mainly about memory leaks and how to choose between application and activity contexts.

2.Handler

1. Internal principles. Handler will ah, The Android messaging mechanism, can be called the Android application engine to. 2. Synchronization barriers. It involves drawing optimization, screen refresh mechanism, etc. 3. Blocking wake up principle. It is common to ask why the loop() method is an infinite loop but does not consume CPU time slices, or why the next() method blocks but does not jam. Further questions will be asked about the IO multiplexing epoll principle in Linux. 4. Lag and memory optimization. All tasks in the entire main thread must pass through Looper, which is the key point to check latons and ANR, and the consequences of too many messages, etc. 5. Message reuse.

Picture 3.

1. Calculate the size of an image. Resolution x pixel point size, looked at many times. 2. Load optimization. For example, how to optimize LaunchActivity for loading too many images at the same time? How to optimize the view size when it is smaller than the image size? 3. Cache optimization. Memory cache, hard disk cache. 4. Glide framework. The key is Glide to the above optimization of the realization principle, so we need to focus on the principle of Glide cache. 5. Drawable. Compare the benefits of using images and drawable, and how drawable works.

4.SharePreference

  • internals
  • The difference between commit and apply
  • This section does not examine much, but it is recommended that readers have an in-depth understanding of the shortcomings of SP, such as the principle leading to ANR, as well as the advantages of the new framework MMKV and Data Store.

5.window

The main types of Windows and the real definition of Windows are explored very little.

6.view

  • Event distribution process. Inspect the most, basically the whole distribution process is clear; It also looks at how to resolve specific conflict scenarios.
  • The View hierarchy of the application interface.
  • Draw flow and timing. The view is still undrawn when the onResume method is called when the activity starts.

7.IPC

  • Common IPC types and their advantages and disadvantages.
  • The mechanism of Binder. Advantages, disadvantages, characteristics, and comparison with traditional IPC. Binder deals with a lot of low-level applications, mostly upper-level applications, such as socket comparison.
  • The socket. This will focus on advantages and disadvantages, usage scenarios, and comparison with binders.

8. Serialization

The principle of Serializable and Parcelable, as well as their advantages and disadvantages, application scenarios.

9.jetpack

  • Pros and cons of using Jetpack.
  • Framework principles. This part if written in the resume is also rarely asked, see the interviewer; But if you do ask, you usually ask how it works.

10.okHttp

  • Interceptors and the chain of responsibility idea. This is the one that gets asked the most.
  • Internal scheduler for concurrent control of threads and tasks.
  • Advantages and disadvantages, advantages compared with URLConnection, birth background, etc.

11. Optimization

  • Performance optimization. Ask a lot, basically see oneself have done optimization at ordinary times.
  • Caton optimization. General questions about how to locate and solve caton problems.
  • Memory optimization. Usually it is memory leak, or reduce memory usage, etc.
  • ANR. We’ll look at how it works and how to solve it.
  • Tools: Leakcanary and Profiler. Optimization involves too much content, this is a relatively deep content, or have to see their usual project accumulation.

Java

Java investigation is a very test of the foundation of the place, a lot of knowledge points are the basis of the foundation, but also can be extended to the underlying logic. These knowledge points in the actual use, there are also a lot of situations need to consider, inspect our knowledge points for the use. Thread pools, for example, have a wide range of knowledge to explore, from the role of parameters, to the mechanism of thread pools, to the blocking wake up mechanism, to the configuration of parameters for actual projects. So this one is up to you. Of course, some basic or often tested knowledge points or will.

1. Collection framework

  • A HashMap. Almost every company asks, mainly internal principles such as hash algorithms, conflict resolution, expansion schemes, advantages and disadvantages of red-black trees, etc. You don’t just die on the spot.
  • HashSet. Internally using HashMap, value is set to Object. Just keep that in mind.
  • ConcurrentHashMap. Will ask. His concurrency principles and benefits, while some interviewers will also ask questions about disadvantages.
  • Hashtable, SychronizeMap. ConcurrentHashMap is used for comparison.
  • CopyOnWriteArrayList. The advantages and disadvantages of thread-safe methods are generally compared.
  • The collection framework focuses on Maps, but the other frameworks List and Queue work as well.

2. Access restrictor

Public Protect Default Private Note in particular that Protect is cross-package accessible.

Class 3.

  • Four inner classes, with special attention to the fact that each class is compiled to produce a class file, static or non-static. The interview was a bummer

The essence of lambda. Anonymous inner classes.

  • The difference between abstract classes and interfaces. This is very understandable, if the development of specific projects will be more profound, this is not reflected in the back of the eight-part essay.

Abnormal 4.

Anomaly system, classification and mechanism. Difference with Error.

5.IO

Mainly ask NIO principle and advantages and disadvantages. It is suggested that the principle of buffer flow should also be studied and compared.

6. The thread pool

  • Internal principles. Of course I will.
  • Functions of key parameters and how to configure them. The key is how to configure, need to consider the specific machine situation, task situation and so on.
  • The role of thread pools. Not only thread reuse, more important is to manage threads, control the number of threads. This also looks at specific project application understanding.
  • There are four common thread pools.

7. The concurrent

  • Sychronize. Must ask, Java lock mechanism. Especially after JDK6 lock optimization and application scenarios. Bonus points for understanding why it is heavyweight and how the JVM layer is implemented.
  • The Lock. Must ask, the principle of AQS better understand. It’s often compared to Synchronize.
  • Volatile. Will be compared to the lock, its two important functions. Further questions will be asked about the CPU cache consistency protocol, as well as the types and principles of instruction rearrangement.
  • The CAS. Must ask, ask principle and ABA question.
  • A deadlock. The general question is how to solve or produce conditions.
  • Wait and notify for Object. Blocking wake up, usually with a code or a specific scenario that asks how to ensure multithreaded synchronization.
  • ThreadLocal. Principles, memory leaks, etc

What this asks is still more, and can ask deeply mostly, the study degree that sees oneself.

8.JVM

  • The GC mechanism. Will ask.
  • Class loading mechanism. Absolutely, but also the parental delegation mechanism.
  • Method call procedure. This also ask quite many, also depends on the JVM learning level.
  • Memory relationships between threads and processes. Such as how much memory a thread takes up, how many threads a process can open, how much memory a process takes up, etc.
  • Memory distribution. JMM, runtime data area, native memory distribution. It depends on your understanding of the JVM.

Kotlin

Kotlin doesn’t really ask, and most projects are still developed in Java. Some companies with Kotlin business ask, but not much. If you haven’t learned this yet, don’t worry. Learning Java well is king. Kotlin and Java are mutually compatible in principle.

1. Coroutines

The main questions are to understand the relationship between threads and coroutines, and the advantages and disadvantages of coroutines. This also depends on the individual’s study degree.

2. Run, let, also, with, apply

Note the return value and scope

3. Specific implementation of features

For example, the implementation of default parameters. If there is, it is best to know. If there is not, you can imagine how Java is implemented, such as default parameters can be associated with method overloading.

Computer network

This part of the network is mainly HTTP and TCP content, classic in the classic. It should be noted that some protocols of the link layer and network layer should be understood, which is also the basis of the computer. It will be embarrassing to be asked not to. Secondly, some new protocols, such as QUIC, HTTP3.0, etc., can be learned, the interview will be very plus, but also can further understand the advantages and disadvantages of TCP.

1.HTTP

  • HTTP doesn’t have much presence on Android because most of the work is taken care of by the framework, asking very few questions.
  • HTTP optimization through the ages and why
  • Request method and response code

2.HTTPS

Will ask. You have to

  • How it works and how it differs from HTTP. Understand encryption algorithms, hash digests, and CA certificate authentication
  • Establishing a connection
  • Crack: man-in-the-middle attack, etc

3. Data link layer and IP layer

  • ARP and RARP
  • NAT protocol
  • DNS

This part of the main ask some common agreements, survey network skills, listed here is the author inspected, readers need to compare prices systematically to learn this piece.

4.TCP

  • Shake hands waved
  • Congestion control
  • Principle of reliable transmission
  • Disadvantages and how to improve. This is more important, corresponding to http3.0 optimization is to start with TCP shortcomings.
  • Upper limit of TCP connections
  • TCP is very important, must ask the content, not readers must go to learn.

5.UDP

  • The advantages and disadvantages
  • Compared with TCP
  • Application scenarios
  • It usually comes with TCP, asking about their differences, and how to optimize TCP’s weaknesses over UDP.

6. Data format

Pros and cons of JSON, why you should use JSON instead of XML. Just memorize it.

Design patterns

The design patterns section doesn’t ask much, because design patterns require actual coding to truly understand their benefits. So most of the time the interviewer will ask which design patterns are used in the project, or which open source frameworks use which design patterns. The next most asked question is the three architectural patterns, will.

1. Common design patterns

Generally, the interviewer will ask us to talk about the design pattern we know, and it is good to speak out according to their own understanding.

2. Reflected in the project and source code

The most common question you ask is what design patterns are used in the framework source code you read. Not only looked at design patterns, but also looked at the source code. It also asks what design patterns were used in the project.

3.MVC\MVP\MVVM

Almost certainly. Combined with the specific project implementation and their own thinking, analysis of their advantages and disadvantages, applicable scenarios, etc.

Computer Fundamentals

Computer basic here includes C language, operating system, database library, as well as the front of the network and so on. This part of the direct content is not much, but it is very important, but also test our foundation is not solid place. Secondly, the interviewer will test our understanding with some business scenarios. For example, when talking about Java concurrency, the interviewer will ask us why thread switching is expensive. For example, when talking about JVM memory distribution, ask what is the memory distribution in native layer and logical memory physical memory, etc. For example, when it comes to volatile, questions about CPU cache consistency are asked. These are all very test of skills. Therefore, these basic content should learn well, not only for the interview, but also for ourselves to better learn and understand knowledge.

1. The C language

Rarely, but occasionally. I was only asked about the memory footprint of isomorphic structures and pointer related issues. C language as the originator of the language, some basic or will be able to.

2. Operating system

  • Interrupt principle and function.
  • Deadlock principle and how to resolve.
  • Operating system this piece does not ask much, also is to inspect the foundation of basic skills. You may not ask, but you must ask.

The above is the factory interview high frequency knowledge points, not to say that all the above knowledge points should be mastered, there is no universal man in the world, we all have knowledge blind area, it is normal to encounter difficulties. Only when encountering difficulties can we solve them on the spot can we show our value. Even if you can’t solve the problem, you can try to speak your mind, and a person’s mind is often a reflection of that person’s mental model and future potential.

In short, technical preparation, work in peacetime. Or should cultivate the basic skills, with this basic skills, not afraid of change, after all, change is inseparable from its roots. As for how to improve the basic skills, I suggest learning more, thinking more, practicing more and summarizing more.

Here are the real questions I checked during the interview. Friends in need just need to like support, and then [Get it for free here】

conclusion

Paper length is longer, summarize experience and has a lot of, through this stage interview, knew his Java foundation, main source reading ability, data structure and algorithm of network programming knowledge and practical ability to summarize the development problems remains to be strengthened, it is a focus of the interview, also need to work on his future, At the same time, self-learning ability is also an important factor in the interview, so we do not become a coder, but to become an excellent programmer, this is the direction of our efforts, make a good plan, study hard, record summary. Make it a habit.

Well, for the time being, I can only think of these. If THERE are other things to supplement, I wish all the students who want to find a job can go to their favorite company and have a bright future!