Memoirs of Interview Questions from Android Major

Recently I met with BAT, Meituan, Kuaishou, Byte, iQiyi, JD, Xiaomi, Good Future, Eggplant Kuaizhuan, Banyu, Yonghui and other companies. I took some company offers, and finally chose to join Byte and record some The problems encountered in the interview, for everyone and yourself in the future some reference. In fact, most of the interview questions are based on the technical points on the resume, but it is not ruled out that some interviewers still interview according to the set of questions they have prepared.

Android related

1. The degree of ui reduction (how to confirm that the effect you made is the same as the ui cut and size, how to quickly compare? Who will confirm this, whether it is development, testing or design?)
2. What has been done to optimize the startup speed , What is the effect of optimization? How to count the application startup time? How to count the time-consuming part of the system? How is the time from clicking the application icon of the launcher to application.attachBaseContext counted? If you find that a certain system library is particularly slow to load, how to optimize it? Which point is better for the statistics on the splash screen or the homepage, so that the user can see and operate?
Some black technologies that I have seen: 1) Improve cpu frequency lock, write values ​​to files in system/cpu, and violently stretch cpu
2) Suppress GC, avoid creating too many objects, how to suppress, you can refer to Alipay’s article https: //www.sohu.com/a/278007600_608959
3) Using javassist to view each method takes time
4) Redex uses interindex to adjust the order of the classes in the dex file, the principle, how to adjust the order of the classes, how to find the classes needed for startup
5) Class pre-loading, the pre-check is removed during the class loading process.
3. The application is installed but never started. How to send a push message to it to let the user open the application?
4. The principle of plug-in dynamic skinning, how to load plug-in resources and the same image name, how to distinguish? Can a class have two Resources?
5. At what stage is the generic erasure? How to get the generic type at runtime? Why can I still get it during operation after being erased? Where is the generic information stored in the class structure? How does gson obtain generic types when parsing? How to get a generic array?
6. Why does flutter use skia engine for rendering, and what are the benefits? Does dart vm understand? Is the component stateful or stateless?
7. How is routing merged for communication between components? How to achieve communication between components? Does the serviceloader understand?
8. Do you understand the file structure of hprof? When uploading to the server is particularly large, how to cut it? How to analyze hprof files? Is there any tool that can quickly find large objects or duplicate objects?
9. The difference between art and dalvik, what is special about android7.0
10. Which area are the pictures allocated on different android versions?
11. How is the certificate verified during the handshake process of https, the three-way handshake of tcp and the four-times of tls?
12. What are the advantages of the okhttp responsibility chain model? How does connection pool reuse work? What rules are used to determine whether a connection can be reused? How is the connection pool cleaned up? Weak network optimization?
13. What are the advantages of http2? What is QUIC and what are the advantages of Cornet?
14. The difference between select epoll poll
15. Can the width and height of the view be obtained through handler. post in Activity.onCreate? Can the image width and height be obtained through view. post? What is the difference between them?
16. What is the dynamic agent of retrofit used for?
17. The realization principle of eventbus? What are its disadvantages?
18. What is the difference between fresco and glide? How does fresco's memory cache work? Why do I need to save undecoded pictures? Under what circumstances will it be put in the undecoded buffer? Do you understand the implementation of Imagepipeline? How is the glide thread pool designed?
19. What is the difference between linear layout and constrained layout? Why do constrained layouts need to be measured twice? Linear layout adds weight attribute to calculate the rule of width and height? Why do I need to measure twice?
20. View drawing principle, SurfaceFlinger Choreographer WindowManager Window WindowManagerService
21. What is the startup process of Activity? The difference between ActivityThread, ActivithThreadProxy, ActivityManagerService, ActivityManager, ApplicationThread, ApplicationThreadProxy, etc.
22. Why does pkms scan the application every time instead of reading the disk? After the apk is installed, how is it resolved? What is the function of apk?
23. What are the frameworks of plug-inization and what are the principles?
24. How many threads can be created in an application at most, and how to confirm that creating threads will not cause OOM in the application?
25. System startup process?
26. What are the components of JetPack?
27. What is the difference between MVVM, MVP and MVC?
28. Why is the constrained layout measured twice? The linear layout has the weight attribute and how is it measured?

Java related

1. New object process, class loading process
2. Deadlock conditions, how to prevent deadlock
3. Garbage collection mechanism, generational collection mechanism, memory model, GC Roots, etc.
4. Six design principles
5. NIO, IO, OKIO, thread pool, thread safety

Algorithm related

1. Reverse order of linked list
2. Determine whether two linked lists intersect, how to find the intersection node
3. Reverse order of words in a string
4. How to find the rightmost node of each layer in a binary tree
5. A large file stores integers , How to calculate the sum of these integers, we must consider the out of bounds, consider the memory
6, find how many 1 is contained in an integer
7, from a relatively ordered number, find the number more than half of the number
8, KMP algorithm, find a certain Is the string a substring of another string?
9. Given a string, return all possible permutations.
10. Find the nearest common ancestor of the two nodes of the binary tree.
11. The linked list is partially reversed. A set of K flips the linked list.
12. Handwritten LRU Cache algorithm
13. Array is converted into binary tree, heap sorting


other

1. When designing a photo cloud synchronization system, what aspects need to be considered, what functions are included, what modules are included, and how to design it? What components are used? How to synchronize?
2. The difference between design and architecture?
3. If there is a job that requires the help of another group, but the project work does not benefit the other group, how to deal with it?
4. What do you think about the big front-end and native?
5. What is the biggest gain from XX company's technology?
6. What are your plans and goals?

Guess you like

Origin blog.csdn.net/smileiam/article/details/115251083