# One side

1. To introduce myself
2. Why is JS single threaded
3. The difference between HTTP and HTTPS, and what security problems HTTPS solves
4. Algorithm: what are the methods of binary tree traversal? Write the sequence traversal
5. What is the difference between throttling and anti-shaking? Write a throttle function
6. Vue two-way data binding
7. Algorithm: The circumference of the island
``Let's say I have a matrix. Each element of the matrix is a square with sides of length 1, with a value of 1 representing land and a value of 0 representing sea. Contiguous (upper, lower, left and right) land grids form an island. Suppose there is only one island in the matrix, find the circumference of the island. Example: the input: grid = [,1,0,0 [0],,1,1,0 [1], [0,1,0,0], [1,1,0,0]] output: 16 input: ,0,0,0 grid = [[0], [0,1,0,0], [0,0,0,0], [0,0,0,0]] : the function of solve (grid) {let count = 0; let mianji = 0; grid.forEach((item, i) => { item.forEach((col, j) => { if(col === 1) { let up = i - 1; let left = j - 1; if(up >= 0 && grid[up][j] === 1) { count++; } if(left >= 0 && grid[i][left] === 1) { count++; } mianji++; } }) }) return mianji * 4 - count * 2; }Copy the code``

The team technology stack: React TypeScript Node.js Golang

# Second face (cross face)

1. To introduce myself
2. ES5 implements array de-duplication (ask the time complexity and the underlying time complexity of the indexOf method I used)
3. Concurrency control implements a dispatch(ARr, n) method. Arr is an array of Promise constructors, promiseG(), which returns a Promise. Promise () execution guarantees that at most n promises will be executed at the same time. Control similar to browser concurrent requests
4. List collapse returns, 1->2->3->4->5->6 Returns 1->6->2->5->3->4
5. Difficulties encountered in the project
6. Write a similar Baidu search box need to pay attention to what problems
7. There are 100 tigers and 1 sheep on the island. Tigers can eat grass, but they prefer to eat sheep. Hypothesis: A: Only one tiger can eat the sheep at A time, and once he eats the sheep, he becomes A sheep himself. B: All tigers are intelligent and completely rational. Their first priority is survival and they don’t mind turning into sheep when they can eat them again. Will the sheep be eaten at the end? What if there were n tigers and one sheep? (Even tigers will not eat, odd tigers will eat into an even number)