iOS Spring Recruit and Interview Process: A Summary of Questions and Insights
As the spring recruitment season comes to a close, I’ve compiled a summary of my experiences and insights from interviewing with Ctrip, Alibaba, Jingdong, and Tencent. This article aims to provide a comprehensive overview of the interview process, questions, and technical topics covered during the interviews.
Ctrip
Ctrip is a very boring company, but I was fortunate enough to get an offer for a summer internship. Here are some of the questions I was asked during the interview:
Ctrip Face Questions: One Side
Consider the following piece of code:
static int a = 1;
int main() {
int m = 2;
char *n = NULL;
l = (char *)malloc(100 * sizeof(char));
return 0;
}
Will visit m, n, l efficiency three types of variables in descending order is () A. lnm B. mnl C. mln D. nlm
Please write a single embodiment of the program:
#include <stdio.h>
#include <stdlib.h>
int main() {
int m = 2;
char *n = NULL;
char *l = (char *)malloc(100 * sizeof(char));
printf("m: %d, n: %p, l: %p\n", m, n, l);
free(l);
return 0;
}
Please write a calculation program 1000 m away from the two AB, Xiaoming go to point B at a speed of 30 m / min from the point A, white take place from the point B to A at a speed of 20 m / min, while the two starting after how many minutes they use to write code that encounter?
Please write the array of the output from “12-12”, “12-11”, “12-11”, “12-11”, “12-13”, “12-14” to simultaneously re-sorted:
#include <stdio.h>
int main() {
int arr[] = {"12-12", "12-11", "12-11", "12-11", "12-13", "12-14"};
int n = sizeof(arr) / sizeof(arr[0]);
printf("Original Array: ");
for (int i = 0; i < n; i++) {
printf("%s ", arr[i]);
}
printf("\n");
// Re-sort the array
int temp;
for (int i = 0; i < n - 1; i++) {
for (int j = 0; j < n - i - 1; j++) {
if (strcmp(arr[j], arr[j + 1]) > 0) {
temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
printf("Sorted Array: ");
for (int i = 0; i < n; i++) {
printf("%s ", arr[i]);
}
printf("\n");
return 0;
}
99-1 calculation result added using a recursive method:
#include <stdio.h>
int factorial(int n) {
if (n == 0 || n == 1) {
return 1;
} else {
return n * factorial(n - 1);
}
}
int main() {
int n = 5;
printf("Factorial of %d: %d\n", n, factorial(n));
return 0;
}
Consider the following piece of code:
- (void)viewDidLoad {
[super viewDidLoad];
dispatch_queue_t queue1 = dispatch_get_main_queue();
dispatch_async(queue1, ^{
NSLog(@"222 Hello?");
});
NSLog(@"aaaaaaa");
}
Program results will be output:
A. Deadlock
B. Print "aaaaaaa222 Hello? "
C. Print "222 Hello?aaaaaaa "
D. Print “”
Ctrip Face Questions: Two Faces
Please talk about the reuse mechanism of UITableView.
Please talk about your knowledge of Objective-C in property fields.
Please talk about your understanding of iOS in memory management.
How to achieve when the underlying ARC?
How do you encapsulate network layer?
How did you learn iOS development?
Alibaba
I had a good overall impression of Ali. The interview process was slow, but I was fortunate enough to get an offer.
Alibaba Face Questions: One Side
Why Alamofire without native NSURLSession, what are the advantages Alamofire is?
If we allow you to encapsulate a network library, or similar Alamofire SDWebImage, how would you achieve?
In a network repository, how to render images for additional TableView fast scrolling process optimization (network libraries can not hold TableView)?
Alibaba Face Questions: Two Faces
iOS system architecture is kind of how?
Common SDK What?
Understand the HTTP protocol it?
What is the difference between GET and POST?
What is the understanding of security?
How to deal with web page hijacked?
HTTPS encryption and decryption process to understand it
Jingdong
Overall, I had a good experience with Jingdong. The interview process was focused on the basis of the official side of the face, and I was asked to answer questions about my projects.
Jingdong Face Questions: One Side
IOS talk about your understanding of memory allocation?
Value types and reference types?
Assume ViewController in a Blcok need to change a property ViewController, you need how to achieve?
After this realization, where the Block is present in the memory?
It is kind of how references relationship?
Function closure, if required closure immediately after the implementation of changes in the value of a variable function, how to achieve?
How to achieve a similar layout micro-channel chat interface?
How to achieve one of the following requirements with Auto Layout layout:!. $% ^ & @ ^ @ (# … (that a lot is to use anyway = = priority will be solved)
Jingdong Face Questions: Two Faces
Talk about the difference between MVC and MVVM, as well as their advantages and disadvantages.
In MVVM, the network request, which is part of the cache processing module should be placed?
Why Swift is a protocol-oriented language?
Use Protocol What are the benefits?
Compare Swift and Objective-C language on the security level?
If ViewController the use of closures, with weak to avoid a circular reference, what’s the problem?
When you click a View, what happened?
How to extend the hit area?
TableView how to optimize?
You can talk about your understanding of rasterization do?
Tencent
Tencent interview really the focus on basic, two faces are on the official iOS is not very good, but there is no project too in-depth discussion.
Tencent Face Questions: One Side
Why Design Cache?
Cache grade What are the benefits?
How to ensure the consistency of multi-core data?
c ++ new and malloc What is the difference?
Can c ++ multiple inheritance?
c ++ references and pointers difference?
How to determine whether there is the intersection of two lists?
Heap and stack area What is the difference?
Why such a design?
Max stack to add a function interface, returns the maximum value of the current stack, how to design?
Given an array of integers sorted array and an integer n, and how to find the number n of the two?
If you have not sorted it?
A string, how to find the character appears only once and the first to appear?
Tencent Face Questions: Two Faces
Reverse a string
Determining whether an integer of 2 ^ n
A m * n board, some grid can not go, how to find the shortest path to the top left to bottom-right?
iOS What happens after pressing the Home key?
c ++ memory allocation What?
c ++ commonly used container What?
queue and vector What is the difference?
vector underlying is how to achieve?
TCP three-way handshake?
Why not twice?
The project has no server push mechanism?