ByteDance Interview Questions: My 3 understandings of Android-view in 2021, and analysis of the real interview questions

Preface

The Spring Recruitment is coming to an end, I don’t know if you guys have found a job you like.

A few days ago, the author had just gotten an offer from Tencent's senior development post. Thanks to the interview experience of a friend during the interview, he reviewed and brushed the questions according to the direction he gave, and passed the interview smoothly. Here is also free to share with the majority of netizens, like it can also help you. If you think the article is good, please click and forward it, thank you!

one side:

He should be a research monk who has recently joined the work. He came up with an algorithm question. The main test is to convert characters to int, and then analyzed the time complexity and space complexity. After that, I talked about the performance optimization of android listView. I also asked me about the characteristics and process of recycalView. Communication methods, I mainly talked about aidl and shared files, broadcasting, originally wanted to use java to install B, and I am still proficient in java, but the brother did not ask, he said wait a moment

Two sides:

On the other hand, the difficulty is obviously increased, and the interview tube should be the group leader. I prefer to listen to the structure. I just made a smart home project from the web backend, client, hardware, etc., and then I blow the logic on the hardware side. , Including bluetooth, wifi HTTP/IP protocol, transparent transmission, etc., infrared sensors, and then web background I said I use sevlet, because the client itself mainly needs an interface, the database uses mysql, and did not ask rollback (hehe), and then put The client showed it to him, it was too ugly without art (this is not the point), because a very important point in my project is to wake up the server when the hardware is triggered to push the background, first after the hardware is recognized, the serial port reads and writes data to The single-chip microcomputer writes the wifi buffer, the wifi transparently transmits data to my server through HTTP (TCP and IP can be used), the server obtains the mac logo, and pushes it to the TAG (family ID) or the user (Alias)
. Implementation principle.
1: pull mode, http long connection or socket, just set the polling interval, shortcomings are poor timeliness
2: push mode, good real-time performance, method 1, Google's own push platform (the network is too poor), method 2, xmpp Protocol (based on XML). In fact, the package is better. There is an open source package called asmark. Among them is the push library XmppConnection. Many companies use its own package library, but the open source demo only pushes, there is no delayed push, message temporary storage function, method 3. Using a three-way
algorithm: It is the problem of merging two ordered arrays. Using two pointers to solve the problem O(n) each time, the algorithm pass
LruCache: Install B first, and talk about what I wrote and the google V4 package. What is the difference, mainly because there is no trimToSize method and no sizeof() to calculate the memory consumption size. I mainly rewrite LinkedHashMap and talk about the source code of LinkHashMap. In fact, I also look at the source code analysis written by others. Learn)

At last

Due to the large amount of work required to organize answers to many questions, it is limited to providing knowledge points. Many detailed questions and reference answers have been compiled into PDF files. Small partners who need it can privately mail me [Interview] to get it for free or click GitHub to get it for free !

g-rvc71cjL-1614050150133)]

Guess you like

Origin blog.csdn.net/Sunbuyi/article/details/113977959