background

I have 3 years of experience. Due to personal reasons, I decided to change jobs, so I started to look for a job in March and lasted about 2 months. I interviewed wechat/Ali/Tiaotiao and got offers from all three companies.

There are many questions, and many of the interview questions are related to personal projects, project related questions reference significance is not great, so here summarizes some questions and projects have no absolute relationship, welcome to watch ~

The answers in this article are given in the form of links, because one of my characteristics is to answer the questions must be detailed enough, and most of the questions I have written articles or the public number forwarded the article, interested in can directly pay attention to the public number front-end Q, I hope to help you ~

The whole process

Here, I sort out some of my own experience, in case I can do the live broadcast, here as a preview, first put a mind map.

PS: The picture is a little big, if you can’t open, go to my blog

WeChat

The written test

  1. The intersection of arrays. Write a function that inputs two arrays and outputs their intersection. The output array contains no duplicate elements and can be arranged in any order.

Address: leetcode-cn.com/problems/in…

  1. Binary tree search, enter the root node of an ordinary binary tree, implement a scheduler, call the scheduler’s next() method, will return the next smallest number in the binary tree; Calling the iterator’s hasNext() method returns whether there is a next number. A binary tree node is an integer and unordered.

Address: leetcode-cn.com/problems/bi…

  1. Number of triangles: enter an array of non-negative integers. Write a function that outputs the number of triangles that can be formed from the array if the elements are selected as the length of the triangle’s sides.

Address: leetcode-cn.com/problems/va…

  1. If it can be split into one or more subsequences, output True. If it can be split into one or more subsequences, output False. The subsequence must be a contiguous array of integers of at least 3 length.
case1: Input: [1.2.3.3.4.5] Output: True Description: Can be split into2Each successive subsequence:1.2.3
3.4.52: Input: [1.2.3.3.4.4.5.5] Output: True Description: Can be split into2Each successive subsequence:1.2.3.4.5
3.4.53: Input: [1.2.3.4.4.5] Output: False Description: Failed to shard out a length of at least3Subsequence of.Copy the code

Address: leetcode-cn.com/problems/sp…

  1. A frog can jump up one or two steps at a time. Find out how many ways the frog can jump up an N step.
  2. Find the output of the following code
function test(a,b) {
  console.log(b)
  return {
    test:function(c){
      returntest(c,a); }}; }var retA = test(0);  
retA.test(2);  
retA.test(4);  
retA.test(8);
var retB = test(0).test(2).test(4).test(8);
var retC = test('good').test('bad');  
retC.test('good');  
retC.test('bad');
Copy the code
  1. top k

Address: leetcode-cn.com/problems/kt…

  1. Closure problems and optimizations
for (var i = 0; i < 4; i++) {
  setTimeout(function() {
    console.log(i);
  }, 300);
}
Copy the code

PS: One written test is required to be 30 minutes, the first 4 algorithm questions, the second writing test is 15 minutes

Questions that have little to do with the project

  1. Throttling stabilization (realize/scene/source, such as lodash principle) (www.cnblogs.com/LuckyWinty/…
  2. Event loop (browser/node/version differences) (mp.weixin.qq.com/s/QgfE5Km1x…
  3. SetTimeout principle (mp.weixin.qq.com/s/7qTRSMqaq…
  4. The difference between React and Vue
  5. Im /post/684490…
  6. Front-end error monitoring and DISASTER recovery (mp.weixin.qq.com/s/prf-mXexB…
  7. Performance optimization mp.weixin.qq.com/s/qXFd3f7Ck…

Mp.weixin.qq.com/s/dy1u2g9Te…

Mp.weixin.qq.com/s/DJ8Fdq1_c…

Mp.weixin.qq.com/s/azeUIx0EA…

Mp.weixin.qq.com/s/wDKKj5R8S…

Mp.weixin.qq.com/s/BOdnCYbMQ…

Mp.weixin.qq.com/s/FdG7uVIDX…

There are too many to stick over, and then summarize it by yourself

  1. Talk about node memory leak (temporary don’t have time to write me a summary of that look at this, zhuanlan.zhihu.com/p/25736931
  2. What are the biggest challenges encountered in the development process (sort through the project and figure out the difficult ones)
  3. How to get the motivation to study and how to maintain it (if you are interested, please pay attention to my live broadcast)
  4. What is the browser’s rendering mechanism (mp.weixin.qq.com/s/wcw30EUb2…
  5. SSR role and advantages and disadvantages of (seo first screen/fast/development cost is higher, I project using the vue SSR, no special summary, can see the first, zhuanlan.zhihu.com/p/35871344
  6. How to manage state (VUex/Redux)
  7. Webpack and browser technology to share what’s the purpose, to share, do share mp.weixin.qq.com/s/1FySzmVrN…

Mp.weixin.qq.com/s/wcw30EUb2…

  1. How to reconstruct project (zhihu many discussion, go directly to the reference, or take a look at this, www.itzhai.com/refactoring…
  2. The difference between the process and thread (www.zhihu.com/question/25…
  3. Talk about the design patterns you know (just refer to the nugget booklet)
  4. CI/CD (mp.weixin.qq.com/s/MbeW8UNZ1…

PS: Because the whole process of the interview lasted a long time, some questions have been forgotten. Probably remember this point, and then very look at the project, each round in detail asked the project ~

Questions and answers that might be of interest

  1. There are several rounds of interviews

I have 4 rounds of technical surface + 1 round of HR surface. At present, technical posts below level 9 on wechat do not need to go through an interview committee, while those below level 9 generally have four rounds of technical information, and those at level 9 and above can have three rounds of technical information. For those at level 9 and above, they need to go through an interview committee in the form of a PPT to tell about their project experience and other technical information. For grade 9 and above, the technical surface varies from 5-10 rounds.

  1. How long it lasted

I always spend more than a month (relatively fast), so if you want to face Tencent, do not quit naked, no, face nothing naked, this year is not easy to mix, a little bit.

  1. What is the overall interview process

Push-back -> one -> two -> three -> four ->HR -> Verbal Offer -> Formal offer-> back -> entry

Each phase takes one to two weeks

  1. Wechat work location

At present, wechat headquarters is in Guangzhou, most of the groups are in Guangzhou, and wechat Pay is in Shenzhen.

  1. Is wechat test algorithm many

Multiple, basically algorithm + project

Ali.

The written test

  1. N of stairs problem (tail recursion optimization [function calls itself finally can reduce intermediate variable | recursion to cycle to optimize] / memo optimization)
  2. Throttling the realization of image stabilization (analysis written answers when asked, summarizes the differences, say application scenario) (www.cnblogs.com/LuckyWinty/…
  3. Deep copy (type considering /Symbol/Date, etc., construction/loop optimization/common reference optimization, etc.)

Mp.weixin.qq.com/s/M7KBX3w2K…

  1. Encapsulates a React component that can only input numbers

Essay question

  1. What happens after you enter the URL (mp.weixin.qq.com/s/DLq_GIkdn…
  2. Event loop says (mp.weixin.qq.com/s/QgfE5Km1x…
  3. JS has several basic types. What are they? What are the differences between them and objects?
  4. JS is how to preserve the context in the process of execution (stack and heap, we can see the geek time of the working principle of the browser, or reference to here, I mp.weixin.qq.com/s/klZ6j3Gj9…

Mp.weixin.qq.com/s/HqADCzMGl…

  1. What do you think is the front end
  2. Why do you want to come to Ali?
  3. What books have you been reading lately
  4. Micro front-end understand? (mp.weixin.qq.com/s/awBqvJmqW…

Mp.weixin.qq.com/s/80S-RFmoZ…

Mp.weixin.qq.com/s/HVwcY8JGy…

  1. What kind of person do you want to be (Personal Growth Plan)
  2. What were the biggest challenges encountered in the project and how were they solved
  3. How to handle a large number of node logs (buffer queue)
  4. The characteristics of http2 (mp.weixin.qq.com/s/OitrWEosr…
  5. How does Node differ from other languages, and what are its strengths and weaknesses
  6. CSRF core principles (juejin. Im /post/684490…
  7. The node event loop (mp.weixin.qq.com/s/QgfE5Km1x…
  8. FCP/FMP/FP is how to define, how statistics (mp.weixin.qq.com/s/wDKKj5R8S…
  9. Select * from MySQL where id is unique and name can be repeated
  10. Did you push anything
  11. A future development is full stack and how to plan it (keep an eye on my live stream)
  12. The principle of link to record screen (can be used as a reference rrweb can, example, mp.weixin.qq.com/s/PxEzBrr3Y…
  13. How to solve the legal problem of link record screen (shielding key information/user authorization, etc.)
  14. FMP definition and statistics, w3c draft do you know (Google)
  15. How to reflect the Sustainability of react project (Google it yourself)
  16. Do you use react hooks? Why do you use them?
  17. What is the difference between H5 and small programs (Google search)
  18. HTTPS encryption principle, man-in-the-middle attack know (mp.weixin.qq.com/s/aMYp6Y5n2…

Mp.weixin.qq.com/s/sHtZhRTNO…

  1. What are the methods of ng load balancing (mp.weixin.qq.com/s/u-XbBwGxH…

Mp.weixin.qq.com/s/o2Us4Zj6D…

  1. What is the role of CDN (github.com/LuckyWinty/…
  2. Im /post/684490 delete array lists that are mutable (juejin. Im /post/684490…

Juejin. Im/post / 684490…

  1. How are objects that internal functions return to the upper layer managed in garbage collection
  2. Es static analysis principle (zhuanlan.zhihu.com/p/33843378
  3. How to count the most repeated lines in a very large file (refer to git’s record store)

headlines

Pen test

A:

  1. I’m going to run the code and find the output and say why, does the output change in strict mode? Why
var a = function () {this.b = 3; }var c = new a();
a.prototype.b = 9;
var b = 7;
a();

console.log(b);
console.log(c.b);
Copy the code
  1. Given an ascending integer array,1,2,4,5,7,13,15,16 [0], find out the number appearing in which continuous interval, the output of [” 0 – > 2 “, “4 – > 5”, “7”, “13”, “15 – > 16”]
function summaryRanges(arr){
    //TODO
}
Copy the code
  1. Implement the following function to request data in bulk, with all urls in the URL parameter, and control the concurrency of the request with the Max parameter. When all requests are completed, the callback function needs to be executed. The function that sends the request can simply use fetch
function sendRequest(urls: sring[],max:number,callback:() = >void){
    //TODO
}
Copy the code

2:

  1. Implement a string reversal: input: www.toutiao.com.cn output: cn.com.toutiao.www

Requirements: 1. No string handling functions. 2

  1. Swap two numbers without resorting to variables.
function swap(a, b) {
    //TODO
}
Copy the code
  1. The observer pattern differs from the published subscriber and writes its model

Essay questions that are not absolutely relevant to the project

  1. Vue event mechanism (juejin. Im /post/684490…
  2. What are the communication modes of vUE components
  3. React Fiber (juejin. Im /post/684490…
  4. Vue responsive data principles (VUE2 / VUe3 / dependent collection/publish subscription/Watcher message queue control /Vue.set implementation) (mp.weixin.qq.com/s/zDv_IQ36o…

Mp.weixin.qq.com/s/hTygoAan4…

  1. Vue to small program how to achieve (AST/lifecycle alignment/cross-platform module compatibility/compatibility detail point implementation process)
  2. Performance index, how to understand how TTI, statistics, and what is the difference between FID, how to implement the statistics, also talked a lot of things (mp.weixin.qq.com/s/wDKKj5R8S performance…
  3. Tell me what you know safety and protective method (mp.weixin.qq.com/s/rU32rVM6Q…
  4. Say you know design patterns, and a corresponding model example (mp.weixin.qq.com/s/x3OCgS_kn…
  5. Future planning and learning methods
  6. How do you think you get the SP of jingdong school
  7. What are the biggest challenges you have faced/what have you learned from the past

My own blog/public account, it seems that interviewers have read, know what I have learned, what I know, so a lot of things on my blog did not ask, even if I extended to the past, do not let me say, there is a feeling of no chance to show, haha

Feelings & more learning materials

In fact, only look at the question, reference is relatively small, after all, the interviewer will mainly ask according to the resume. One of my feelings here is that the biggest challenge I encountered in the project was really difficult to answer, and I did not answer it well enough at that time. Later, I went back to summarize a wave of projects, and suggested that everyone summarize their own problems and get to the bottom of it.

This part of the questions, I will synchronize to my weekly N questions, welcome to exchange answers ah. Those who want to brush the question can also come, the address is as follows: github.com/LuckyWinty/…

It’s a lot of knowledge. I haven’t been asked about it, but I’ve written a lot of articles. If you’re interested, check out my blog at github.com/LuckyWinty/…

More blogs that I think are good are as follows:

  • Juejin. Im/user / 430664…
  • Juejin. Im/user / 483440…
  • Blog. Poetries. Top/FE – Intervie…
  • Juejin. Im/user / 394910…
  • Juejin. Im/user / 430664…

communication

  • Welcome to add my wechat (Winty230), pull you into the technology group, long-term communication and learning…
  • Welcome to pay attention to “front end Q”, learn front end seriously, do a professional technical person…