preface

In 2020, a sudden outbreak of the epidemic disrupted the pace of life of many people. I happened to be looking for a job after the New Year for some reasons. I also saw many friends around me talking about the various situations of job hunting during the epidemic period, and wrote this article based on personal experience and thinking in the past five years.

The interview process

During the pandemic, all interviews are conducted remotely. Here is a brief introduction to some of the companies interviewed during the pandemic. I also got offers from several of them. The interview questions introduced below only restore the most impressive part of the interview, there will be deficiencies, do not represent the whole interview.

millet

One side

  • This paper introduces the design principles, and explains in detail the application of the open and closed principles in the project.
  • Introduces design patterns, and then asks me about abstract factory and adapter patterns.
  • This section describes runloop knowledge and its application in actual development
  • Request a detailed description of the event response chain

Second interview

  • Introduce the past project experience, because the past project is highly matched with the job requirements of the department I am interviewing, so this part takes up a lot of time.
  • Palindrome algorithm
  • (algorithm) determines whether a string is symmetric, such as abBA or ABA.
  • Implementation principle of Block
  • This section describes the HTTPS process in detail.
  • What optimization work has been done in the past development, ask more detailed.
  • How to detect lag in projects (such as suspended animation)
  • The message forwarding process and event response chain are introduced in detail
  • The underlying thread scheduling principle of GCD
  • This section describes the principles of the hash algorithm

On three sides

  • A binary tree layer by layer printing algorithm
  • Introduce my past project experience, and ask some thinking about the structure of the project
  • If you are making a new network layer framework now, what points need to be considered

baidu

Baidu has only one side, because it is baidu’s commercial department, which is very strict about details. Personally, I feel that my performance is really not very good.

  • Determine if a string is an ipv6 address (do your best to consider all exceptions)

PS: At that time, the interviewer clearly told me that I could not do well in the interview question, and the interview ended directly.

  • This section describes how to optimize the interface lag.

  • Introduces the inheritance chain of UIResponder. And then the event response chain.

Bigo

I feel that Bigo has the most comprehensive survey of the fundamentals among the companies interviewed.

One side

  • (Algorithm) To find the largest part of a page in the area of leakage, overlap according to the area of the topmost leakage, there will be time complexity requirements.
  • Brief introduction of past project experience
  • Control the click event or gesture added to it which responds first, and explain why
  • CoreAnimation and CoreGraphic
  • Explain how @synchronized locks work and what problems they may have. It also introduces the common locks in iOS development.
  • This section describes the compilation process and principles
  • Talk about the understanding and function of Bitcode.
  • This section describes the Https process in detail.

Second interview

  • This section describes common attribute modifiers, and the differences between assign and weak. This extends to memory-management concerns, such as the way reference counts are handled.
  • Talk about the understanding of GCD, and how GCD is the underlying thread scheduling. Common GCD methods (group, semaphore, barrier, etc.)
  • The principle of KVC and KVO is introduced in detail.
  • This section describes the message forwarding process
  • This section describes Runloop and its application scenarios. There will be further questioning in specific scenarios.
  • Introduce the experience of project optimization, which will be more detailed.
  • Introduces the understanding of static and dynamic libraries.
  • Problems and solutions exist in the process of using Webview.

On three sides

  • This paper introduces the past experience of using RN and the understanding of Flutter.
  • Discuss the understanding of componentization and the common componentization scheme in the market
  • Asked some APM up questions.
  • Talk about personal understanding of the choice of project architecture. How do I choose architecture (mainly for MVVM, MVC, etc., I have my own understanding of this part later)
  • On Personal Planning

drops

One side

One side of the didi is divided into two parts.

  • Part one: Past project experience. Based on your past project experience and your description, the interviewer will ask you questions related to the project introduced to you, and then extend some questions based on it. This part accounts for a large proportion.
  • The second part is basic knowledge
  • Discuss the possible problems and causes of attribute modifiers if assign modifiers.
  • We discuss memory management in more depth, including the process of memory management for reference counts and weak objects. Ask more in-depth questions.
  • Talk about your past experience with Runloop.
  • Introduce the realization principle of tripartite library which I am familiar with

Second interview

  • An understanding of locks (spinlocks and mutexes), as well as common locks in iOS development. Ask to describe the situations in which the individual has used locks during the development process.
  • What multithreading problems have been encountered in the actual development and how to solve them.
  • Why pages cannot be updated in asynchronous threads?
  • An understanding of memory leaks and a solution to the problem.
  • Some optimization up the problem, mainly according to their own introduction of optimization for more in-depth questioning.
  • A tank from the starting point to the end of a space, in the middle of some locations have a barrier, judging whether there is a feasible path from the starting point to the end of the algorithm.

On three sides

  • Introduce the previous project experience and main responsibilities in detail
  • Introduce the most challenging aspects of the past project and discuss them in depth accordingly.
  • Some understanding of the architecture is introduced
  • On Personal Planning

Well quickly

Quick hand one side is cross-department interview, the second side is the department’s facade, so one or two aspects of the test questions will have some repetition, only wrote once.

One side

  • Introduce past project experience
  • Two algorithms that are not too difficult (specifically forgotten…)
  • We talked about possible problems with assign modifier objects
  • Talk about optimization experience in past projects
  • This section describes the message forwarding process

Second interview

  • More detailed talk about the block, in-depth about the implementation of the principle, and introduce the different variable reference way.
  • This section introduces the common circular reference in development, and explains the reasons and solutions and principles.
  • Introduce Runloop and its application scenarios.
  • Binary tree flipping

On three sides

  • A multi-threaded actual scenario under the problem, requiring remote write implementation of the code
  • Talk about MVVM, MVC and MVP understanding.
  • Introduce the experience and problems of using RN in past projects.
  • How to load a large memory image like a map (just say the implementation idea)
  • Talk about the understanding of componentization, the understanding of componentization scheme on the market, and the pros and cons analysis.

other

In addition to the companies introduced above, we also met ping an, 51 Talk, 58 Tongcheng, Good future, beauty.

Because most of the interview content and above basically just repeat, only to the difference of the interview questions were summarized.

  • Knowledge of image codec
  • How is memory management done in child threads
  • How JSBridge is implemented and the invocation relationship with native.
  • Asked some practical development questions related to AFNetworking and SDWebImage.

IOS some interview preparation

Having finished talking about the interview questions in the interview process, let’s talk about some preparations before the interview.

As a matter of fact, I have prepared for this job-hopping for a long time, so the epidemic does not have a great impact on me. In addition, I want to emphasize that the basic knowledge of iOS interview lies in daily accumulation and summary, and it is not enough to simply rely on short-term preparation before the interview.

Below according to the above interview questions and previous personal interview preparation, the whole interview process has been combed.

1. The algorithm

“Finger Offer” was typed by Swift and then handwritten by OC in more than half a month.

Medium and Easy questions on LeetCode are 150+

For domestic partners, basically client interview involves algorithm knowledge is enough to cover. Of course, the three sides of the fast hand algorithm is still abused…

A lot of spelling

Pinduoduo should be a relatively large company in its own face. In the interview process, there were some differences with the interviewer. At the back, I was asked which file and which line the source code was in.

One side

  • Algorithm: handwritten LFU (write with dictionary for more than 20 minutes, the interviewer let the optimization only know can use double linked list optimization, but collectively failed to write)
  • An operation returns nil if it takes 5s, otherwise returns a string.
  • Common operations in GCD (code required)
  • Struct has some member variable in how many bytes
  • The number of bytes of memory that an OC object takes up in iOS.
  • Have you seen the source code for alloc, and what file you just mentioned is in which line
  • Dealloc’s entire process
  • NSURLSession (I forgot)
  • How do Web and Native share cookies
  • Xx (ex company) has a dynamic library package, you have seen xx IPA (ex company APP) structure
  • The difference between an inline function and a normal function
  • How to hook a C function
  • Do you have any questions

baidu

Baidu’s questions are less related to iOS, while CS is more basic.

One side

  • Talk about the project: mainly asked about the choice of technology stack of the project, and what difficulties there are in the project
  • The HTTP headers and body
  • GET and POST requests
  • GET request parameters must be placed in the URL
  • HTTPS (TLS)
  • The difference between dynamic and static libraries
  • The difference between the load and initialized methods
  • +load call timing
  • + Load classification processing
  • The implementation mechanism of classification
  • The difference between categories and categories
  • Add attributes to categories
  • Principles of associated objects
  • Algorithm: there is a large plastic data, the number of 1 into binary (because the previous chat is more, only require to say the idea)

Second interview

  • Talk about the project: my project is in the backend, I asked a lot of content related to the backend, and the follow-up questions basically require answers from both the client and backend perspectives
  • You know network protocols
  • The connection between HTTP and TCP and UDP
  • Difference between HTTP and HTTPS
  • The principle of HTTPS
  • What encryption algorithms are used to establish HTTPS connections, and why
  • Common encryption algorithms
  • The difference between symmetric and asymmetric encryption algorithms
  • Talk about clicking a button to open a Web page from sending a web request to displaying the page
  • Why can a resource be requested through a URL (domain name resolution, etc.)
  • If there is a button on the client, clicking on it will trigger a network request, and click it quickly in a short time, how to deal with it (from the perspective of the client and the server)
  • Do you know what HTTPDNS is
  • POST request parameters can be placed in the URL
  • You know the HTTP request response status code
  • Tell me why 304 is a status code
  • How to maintain the session state during Web login
  • Do you know the difference between cookies and sessions
  • Do you know the common cyber attacks
  • What is the principle of man-in-the-middle attack and how can it be prevented
  • Have you used the packet capture tool? Talk about the principle of packet capture
  • If you were to design an HTTPS capture packet, what would you do
  • What is the difference between a process and a thread
  • Process communication mechanism
  • Process A and process B communicate through A pipe in the same pipe
  • Multithreading is prone to problems, how to solve
  • Deadlock conditions and corresponding solutions
  • Spin-locks are different from mutex
  • What is virtual memory, the relation and difference between virtual memory and physical memory
  • What are the page feed algorithms between lines
  • LRU, LFU
  • Continue to ask the project, why do these things, what are the difficulties
  • What do you think are your strengths and weaknesses
  • My own future plans
  • Anything else you want to ask

On three sides

  • Baidu’s three main questions and career planning related content, not too much reference value, this will not be described

tencent

Since the appointment was relatively late in the music process at the beginning, PCG wanted to talk with me before making a choice, so Tencent met with Tencent Music and PCG departments

PCG

PCG was in front of the music, and I talked about it and talked about it, but because the flow was in the music, I was asked to choose a flow, and I chose the music, but I was too shy to lick it back after the music died.

One side

  • Chat program
  • How category works
  • Weak implementation principle
  • Crash encountered during development
  • How to deal with these crashes? Is there any good solution
  • Circular reference problem, how to solve
  • NSTimer is related to runLoop
  • Comparison of NSTimer, CADisplayLink and GCD Timer
  • Algorithm: N!

Tencent music

Tencent music business is not a lot of mouth, I feel that the interviewer does not know what to ask me, there is no follow-up.

One side

  • Before talking about projects: background benefits, etc
  • Want to see the opportunity
  • That’s how RN communicates with native
  • What would you do if you were asked to implement RN?
  • How does Native expose the method
  • How did you solve the difficulties in requirements
  • What does A do when he calls method B
  • ISA pointer
  • How to obtain ISA pointer after 64 bits
  • I worked with runloop and Runtime
  • Finger touch screen behind-the-scenes system to do what
  • How to monitor page lag
  • How to monitor function execution time
  • Anything else you want to ask

weibo

I’m a little confused on weibo. I feel that the interviewer is just asking questions in the question bank, and I feel that I answered them OK, but after a while, I don’t know what to do.

One side

  • Basically, these are some of the basics of iOS, which are highly repetitive as mentioned in this article.

Bigo

The whole process of Bigo was pushed forward quickly, one side and two sides were completed on the same day, but Bigo failed after three sides, a little confused, I guess because the algorithm of the second side did not give the optimal solution.

One side

  • Algorithm (three handwriting)
    • String shaping
    • Reverse linked lists (recursive and non-recursive)
    • Combine two ordered lists into one ordered list
  • IOS basis:
    • Objective-c memory management
    • ARC and MRC
    • How to avoid circular references when using timers
    • The underlying implementation mechanism of autoreleasePool
    • The underlying data structure of autoreleasePool, why this design
    • Multithreading common in iOS
    • A common lock. What’s the difference
    • If you could design read/write locks, what would you do
  • RN, FLUTTER, WEEx:
    • What do you think of these dynamic technologies
    • RN, FLUTTER, and WEEx
    • How does RN communicate with native
  • After a brief talk about the future planning

Second interview

  • Algorithm: Mountain array to find the target value (logN time complexity required)
  • QA found a button that did not respond to the click event, what might be the cause (mentioned 5 cases that did not answer the interviewer’s request)
  • IOS responder chain, how do you find the most suitable responder, what if it’s nil
  • Difference between frame and bounds
  • What if the origin of the bounds is not 00
  • Have you ever used Charles? Tell me about Charles’ principle of packet capture
  • Can Charles catch HTTPS? How
  • How does HTTPS establish a connection
  • Man-in-the-middle attack, how do you avoid it
  • What is the problem with multithreading, please give an example
  • Why do these problems occur and the solutions
  • Relationship between the main queue and the main thread
  • Global concurrent queues must run on the main thread
  • Project related, what technologies are used, what difficulties are there, how to deal with them

On three sides

  • To introduce myself
  • Why do you want to see a chance
  • We talked about the project
  • What about RN and Flutter
  • Have you read any technical books
  • Have you looked at open source frameworks
  • What’s the hardest thing you’ve ever faced at work
  • Do you have any questions

Shell to find room

Shell also felt a little confused, and the interviewer felt very good chat, asked questions are very open, very test of skills, and finally asked me if you feel you have passed. But after one, there was no next.

One side

  • To introduce myself
  • Chat program
  • GCD see what you can say
  • Runtime see what you can say
  • Memory management see what you can say
  • A few simple linked list problems (I forgot specifically)
  • What do you want to ask, and some suggestions for me according to the resume? (The resume tends to be full stack, meaning THAT I have not worked for a long time, so I need to have depth and breadth, and I can consider it later.)