Android interview summary, thinking about the current situation and future development of Android development, algorithms are too important

basic situation

Let me talk about my basic personal situation first, majoring in computer science and technology. Mainly learn Android development, so the job positions are all Android development engineers. I voted for Zhihu and internally pushed Ali Mogujie, Tencent, Baidu Netease. Tencent and Baidu have not received any interviews. I know that Skype interviews, Mogujie Ali phone interviews, and NetEase live. Zhihu was rejected on the second side, Mogujie Ali was rejected on one side, Netease on the other side, and then spare tires. I was notified a few days ago and received the offer. I have sorted out the questions I have been asked, and now share them with you. In addition, the information I have sorted out will also be sent to you, hoping to help all job-seeking partners.

One side (104min)

  • Self introduction.

  • The difference between threads and processes.

  • Thread safety. The interviewer asked if he understood the volite keyword, but Xiaojin forgot to answer it. The interviewer asked whether he knew about spin locks, optimistic locks, pessimistic locks, etc. Xiaojin answered that he understood but never used it.

  • What is the realization of http.

  • The difference between TCP and UDP.

  • Why TCP is reliable. Pay attention to the algorithms involved in the congestion mechanism (slow start, congestion avoidance, fast retransmission, fast recovery).

  • The difference between Get request and Post request. Note that the Get request is more efficient than the Post request. The Post request requires the server to return 100 before sending data processing, and the Get request directly passes the URL. The interviewer asked if he knew other request methods, Put, Delete, Head.

  • Ask an A Activity in the project to jump to a B Activity, walk around the life cycle, click Back to return. What if an A Activity is transparent? What if B Activity is a Dialog? The interviewer asked about the horizontal and vertical screen switching life cycle and whether he knew about onConfigurationChanged.

  • The source code of HashMap, the conditions for expansion.

  • There are two algorithms, one is to merge two ordered linked lists, Xiaojin wrote with the idea of ​​merging, sorting and merging process (using the IDE for a long time, many mistakes, but the interviewer is very patient to help me correct errors). One is the idea of ​​outputting the words in a piece of text in reverse order, mainly investigating the knowledge of data structure, using stacks and queues.

  • Ask about Xiaojin's basic situation, internship time, etc.

  • Rhetorical link: Actually, I didn't ask. The interviewer suggested that Xiaojin should have a deeper understanding of common knowledge, look at the source code, write code with Notepad, and look at basic data structures and algorithms.

Two sides (57min)

  • Self introduction.

  • The difference between Android static library and dynamic library.

  • Binder mechanism in Android.

  • Communication between Android processes.

  • Talk about spin lock, internal implementation.

  • Asked about thread synchronization, Xiao Jin said sychroized again, or refer to that blog.

  • I don't know if I understand Java's atomic and many very low-level things. I can't remember, most of them have not answered.

  • Algorithm problem: Solve the shortest path from the start point to the end point of the rectangle. You can only go right or down. This is a simple dynamic programming problem.

  • Ask about Xiaojin's basic situation, internship time, etc.

  • Rhetorical link: Ask Xiaojin what knowledge he needs to improve if he wants to join. The interviewer suggests participating more in actual projects.

Three sides (40min)

  • Self introduction.

  • Difficulties and solutions in the project. Xiaojin is talking about using addView to achieve the effect of pop-up boxes, but it takes a long time. Later, I learned about Fragment and used Fragment instead of addView. The interviewer asked if he could analyze why it is so slow. Xiaojin mentioned the drawing process of Android Activity->PhoneWindow->DecorView->ContentView->WindowManager->RootViewImpl. The interviewer continued to ask about the type of ANR, the reason and the method of investigation. The interviewer continued to ask about the difference between Fragment and Activity and the advantages of Fragment.

  • Talk about the use of multithreading in Android. The interviewer asked how to stop a thread.

  • The principle of Handler. Looper, MessageQueue, Message. The interviewer asked about sending a message to another Handler in one Handler, but Xiao Jin didn't really understand it.

  • Java memory, recovered search algorithms: reference counting and root search algorithms.

  • Algorithm question: Reverse the order of a 32-bit int integer, and Xiaojin uses rounding and remainder to get each bit and save it in the linked list, and then reverse the linked list.

  • Ask about Xiaojin's basic situation, internship time, career plan, etc.

Hr surface (20min)

  • Self introduction.

  • Ask about Xiaojin's basic situation, internship time, career plan, etc.

  • I gave a verbal offer.

At last

If you see this and think the article is well written, give it a thumbs up? If you think there is something worth improving, please leave me a message. Will definitely inquire carefully and correct the deficiency. Thank you.

Finally, for Android programmers, I have compiled some information for you, including not limited to advanced UI, performance optimization, mobile architects, NDK, hybrid development (ReactNative+Weex) WeChat applets, Flutter and other all aspects of Android High-level practical technology; I hope to help you, and save everyone's time to search for information on the Internet to learn, and you can also share dynamics with friends around you to learn together!

Friends who need information can click on my GitHub to get it for free

4%BA%9B%EF%BC%9F%E5%A6%82%E4%BD%95%E9%9D%A2%E8%AF%95%E6%8B%BF%E9%AB%98%E8%96%AA%EF%BC%81.md)

Guess you like

Origin blog.csdn.net/Sunbuyi/article/details/112944468
Recommended