Foreword: some time ago and we exchange, according to the feedback now Android jobs are not as many as before, of course, this does not mean saturation, but the market is more reasonable, just like the housing price in Shenzhen, before the rapid rise, after the New Deal, the housing price gradually tends to be reasonable. Android still has a lot of opportunities. Recently, I have compiled some interview questions based on my interviews with students (including social and school recruitment). In fact, many interview questions are available online. A lot of people say, you can recite the answer, I don’t think so. Back and actual development encountered, said is not the same. For example, how do you use multithreading? That’s the question. Back of the answer, often to the inside a detailed ask, may not know. Without further ado, I have compiled the following interview questions for your reference. It is better to know than not to know. I can help you find out. Here are the interview questions for Tencent, Baidu, Huawei, Sogou and Didi

Android based

  1. View drawing process; Custom View how to consider the model adaptation; Custom View event distribution mechanism; View and ViewGroup have what event distribution related callback methods; Custom View how to provide access to View attributes interface;

  2. Art and Dalvik contrast; Principles of virtual machines, how to design a virtual machine (memory management, class loading, parent delegation); JVM memory model and class loading mechanism; Circular references to and avoidance of memory objects

  3. Memory reclamation mechanism and GC algorithm (advantages and disadvantages of various algorithms and application scenarios); GC principle, timing and GC objects; Memory leak scenarios and solutions; OOM avoidance and solutions

  4. Four components and life cycle; ContentProvider permission management (read/write separation, permission control – down to table level, URL control); Compare the four startup modes of the Activity; The Activity state is saved for recovery

  5. Fragment life cycle; Fragment State Saving

  6. Which class method is startActivityForResult, under what circumstances is it used, and how should it be decoupled if used in Adapter

  7. Principle and deficiency of AsyncTask; Principle of IntentService

  8. What is the difference between AstncTask and AsyncHttpClient

  9. How to ensure that a background service is not killed; What are the more energy-efficient ways

  10. How to intercept and abort a text message via broadcast; Whether the broadcast can request network; Broadcast causes anR time limit

  11. Interprocess communication, AIDL

  12. Handler mechanism and underlying implementation

  13. Binder mechanism and underlying implementation

  14. Difference between ApplicationContext and ActivityContext

  15. The memory occupied by a Bitmap and the calculation of the memory occupied

  16. How does the application update piece work? (Grayscale, forced update, regional update)

  17. Mixed development, RN, WEEX, H5, small procedures (do Android to understand some front-end JS is still very good)

  18. Name and design an APP that you think is hot right now.

Java based

  1. Collection classes and collection frameworks; Implementation principle of HashMap and HashTable, thread safety, hash conflict and processing algorithm; ConcurrentHashMap

  2. The difference between processes and threads; Multithreading and thread pools

  3. How to ensure data consistency; Synchronized keyword, class lock, method lock, reentrant lock

  4. Method of synchronization; Multi-process development and multi-process application scenarios

  5. The server only provides the data receiving interface, in the multi-thread or multi-process condition, how to ensure the orderly arrival of data

  6. ThreadLocal (ThreadLocal) ¶

  7. String StringBuilder StringBuffer comparison

  8. Interfaces and callbacks; The principle of callback; Write a callback demo;

  9. Generics principle, illustrated by examples; Parsing and dispatching

  10. Differences between abstract classes and interfaces; Application scenarios; Can an abstract class be without methods and attributes

  11. Can static properties and methods be inherited? Can it be rewritten? why

  12. Change the signature of the equals method of object A, which equals method will be called when using HashMap to store instances of the object

Data structures and algorithms

  1. What is the difference between heap and stack in memory (data structure vs. actual implementation)

  2. What’s the fastest sorting algorithm? Which algorithm should be chosen to rank alibaba’s more than 20,000 employees by age? The difference between heap and tree; Write fast typesetting code; List reverse code

  3. Find the number of daffodils up to 1000 and the number of daffodils up to 4 billion

  4. Substring contains the problem (KMP algorithm) write code to achieve

  5. Bit mapping -> Hash grouping -> multi-file read and write efficiency -> Disk addressing and application layer optimization for addressing

  6. Ant colony algorithm and Monte Carlo algorithm

  7. Write down what you know about sorting algorithms and space-time complexity and stability

  8. How to try to find the nearest merchant function in Baidu POI (coordinate mirror +R tree)

other

  1. Four necessary conditions for deadlocks

  2. Common coding mode; Chinese in UTF-8 encoding takes up several bytes; Int several bytes

  3. Implement a Json parser (speed up with regex)

  4. MVC MVP MVVM; Common design patterns; Write the code for observer mode

  5. TCP’s three handshakes and four waves; Differences between TCP and UDP

  6. The HTTP protocol. Differences between HTTP1.0 and 2.0; HTTP packet Structure

  7. The difference between HTTP and HTTPS and how to achieve security

Summary of non-technical issues

  1. What are the in-depth research fields

  2. What are the channels of attention to information in the industry

  3. What books have you been reading lately

  4. The technical fields and points in which you are most interested

  5. What open source libraries are used in the project, and how do you avoid security and stability issues caused by the introduction of open source libraries

  6. What did you do during the internship and what was the output

  7. Five coins, two heads and three tails how do you divide them into two piles and then flip them over and have the same number of heads as tails

  8. The hour hand overlaps several times as the clockwise goes around

  9. N by N square paper, how many squares are in it

  10. Now the download speed is very slow, try to analyze the reason from the perspective of network protocol, and optimize (all 5 layers of the network can be involved)

HR Problem Summary

  1. Tell me something that impresses you most

  2. Describe a project that has had the greatest impact on you

  3. Introduce your favorite field of expertise

  4. What was the biggest benefit of the internship

  5. What are your strengths and weaknesses? For example

  6. What is your learning method? How do you learn during the internship? What was the biggest difficulty you encountered in the internship program and how did you solve it

  7. Tell me the one thing that best demonstrates your ability

  8. What was the biggest difficulty encountered in the project? How to solve it

  9. Your career plans and personal goals; Future development route and job positioning

  10. Evaluate yourself, evaluate your technical level, how much personal code

  11. Through what channels to know recruitment information, other students have invested in what companies

  12. What are your hobbies in your spare time

  13. Current offer status; If BATH gave offer how to choose

  14. What do you value more in a job? Platform, technology, atmosphere, city, money

  15. Ideal salary range; Hangzhou post and Beijing post choose which

  16. What is the ideal work environment

  17. What can I learn from my colleagues/classmates during the internship

  18. Your family’s job expectations and your own job expectations

  19. What can you do if your boss misunderstands you in a public meeting

  20. Whether you can practice and for how long

  21. What do you see in this company? Or what aspects of the company appeal to you most?

The first time to get blog updates reminder, and more Android dry goods, source code analysis, welcome to my wechat public number, scan the qr code below or long press to identify the QR code, you can pay attention to.