After a week of interview and time communication, I finally passed and got the offer

As a developer, it’s especially important to have a learning atmosphere and a networking community, and this is one of my iOS networking groups:812157648, no matter you are small white or big ox welcome to enter, share BAT, Ali interview questions, interview experience, discuss technology, we exchange learning growth together!


A:

The difference between a pointer and a reference 2. The difference between a virtual function and a pure virtual function 3. In a binary tree, where each point contains point weights (including negative weights), find a starting point and an ending point to maximize the sum of point weights along the path. 2. If a number has a factor of 2, 3, 5 then it is called ugly. Find the NTH smallest ugly number (where 1 is the smallest ugly number) (BFS with heap, each time *2,*3,*5, and use map to prevent repetition) 3. Find the maximum loop substring of a string (O (n2) O(n^2)O(n2) method can use enumeration center extension and dp, O(n)O(n) O(n)O(n) using horse-drawn cart or hash)


2:

2. Given a two-dimensional array of 01’s, find the largest side length of the square of 1’s. (DP, record the maximum side length of the square that can be formed by each point as the lower right corner of the square, and then transfer the maximum consecutive 1 number upward and left by this point) 3. Determine whether a binary tree is a complete binary tree (BFS, if a point is empty and the rest of the queue has non-empty points, then the binary tree is not a complete binary tree) 4. Types of data structures


Three sides:

1. Given an array, find the largest sum of the numbers in the array that is divisible by three. (at that time, I did not write the 01 backpack, and later thought, for each number, if mod3=0, that is to add the answer, if 1,2, then add the array respectively, and then sort, greedy combination) 2. Given an array of two rows incremented from left to right and columns incremented from top to bottom, find target.

Originally written by: Zzugzx

Original address: t.cn/A652LfpO