Written in the book of the former
I am Chenshuang, who graduated from a non-Chinese university in 2012. After about a month of interview process, I successfully got the offer. This article mainly records my interview experience, hoping to be helpful to you.
To prepare the interview
Chance is for those who are prepared.
The author used to do outsourcing in local life in Alibaba. Due to the particularity of outsourcing work, I began to prepare for the interview at the end of March, mainly preparing algorithm and React.
Prepare algorithm
Let’s talk about algorithms first. At that time, THE author was an algorithm white, even time complexity can not calculate the kind of, let’s first talk about how the author learned algorithms.
Personally, I think the difficulty of algorithm is really too big. If you read books or related articles such as “Introduction to Algorithms” at the beginning, you will definitely be confused and even counterproductive. At this time, you need a very good introductory course to learn. Here recommend SSH big god recommend Bobo teacher’s video tutorial to play algorithm interview, really very good, Bobo teacher will start from the most basic, but also in the form of animation to help you understand the algorithm. It took the author about a month to finish this course and more than 100 leetcode brushes following the video. After learning this course, my thinking has really improved a lot.
Incidentally put a Github address JavaScript algorithms and data structures, this more comprehensive, but not suitable for entry.
Some people may think that there is no need to learn algorithms without entering the factory. I personally think that learning algorithms are certainly useful. As long as you are a programmer with a little pursuit, you will certainly go to learn algorithms. Generally speaking, the interview of the author in the past month, although the proportion of algorithm in the interview is not high, but it is very important. For example, when the author interviewed Ali, the first question is to do algorithm, and then the subsequent interview.
Ready to React
Hooks: It’s 2021, hooks are a must-have skill. Here is Dan’s complete guide to useEffect, which will help solve hooks.
Why do you need a Concurrent Mode for React? Fiber is the code for a Concurrent Mode for React. Hooks work on the React update process. At U1S1, Mr. Ka chose not to publish a booklet but to give it away for free, Risby.
Some of the other
React algorithm +React Algorithm +React algorithm +React algorithm +React
- Summary of interview questions from Webpack
- The face of god three yuan
- Dead knock 36 JS handwritten questions
- Close reading of Dom Diff’s Principles
- An interview with TianTianUp
The interview process
Byte interview is niuke.com, the form is video interview + online code, the first interview or quite nervous.
One side
On the one hand, the interviewer is a very young student, so the questions will be younger.
- What has been updated in Act17?
- What is fiber for React? What problems have been solved?
- Why the minimum setTimeout can only be set to 4ms? How to implement a setTimeout of 0ms?
- You have REM and VW on your resume, can you talk about that? Why did you choose rem over VW?
- The answer was rem compatibility is better, and the conversion of PX to REM avoids long decimals.
- How does the browser calculate decimal units?
- At that time, I did not answer, but just said round. Later, I looked up relevant information and learned that different browsers have different policies, some will round, some will directly round. No matter what the unit, the browser ends up Computed to PX before rendering.
- What is the difference between interface and type? Do you use interface or Type in your daily work?
- Are you familiar with ts contravariant and covariant?
- There is no
- Can you explain how applets work?
- There are a lot of related articles on the Internet.
- Taro: How does React run in an app?
- Taro3: JSX -> VDOM -> JSON -> WXML: Taro3: JSX -> VDOM -> JSON -> WXML
- You mentioned that json-> WXML can be done in two ways (template recursion and custom component recursion). Can you talk about the pros and cons of the two ways?
- The template recursion is a pure view layer operation, and the performance is definitely better. However, due to the limitation of wechat applet WXML compiler, the template cannot recursively call itself (Alipay applet does not have this limitation). Therefore, Taro writes the same template n times in the wechat environment, with only different ids. Just for recursive rendering.
- However, custom component recursion involves the logical layer, such as the life cycle, which has poor performance. At the same time, there are style problems caused by Shadow DOM. Currently, KBone uses custom component recursion.
- Small program has HMR, can you talk about the principle of HMR?
- Applet does not have HMR, at that time only spoke out save code applet is how to refresh, HMR did not speak out.
- Tell me about z – index
- Tell me about the position
- Implement a TS Include
- Don’t
- Implement a useInterval
- That’s not quite right
- Js event loop Execution sequence
- Implement an IMmutable
- Here to give a big guy’s implementation, I realize the dish too
function immutable(obj) { return { set(path, val) { const paths = path.split('. ') const lastK = paths.pop() this.get(paths.join('. '))[lastK] = val return this }, get(path) { const paths = path.split('. ') return paths.reduce((a, k) = > a[k], obj) } } } Copy the code
That’s the end of the story, and you can feel that byte is very serious about the cutting edge and the bottom. At that time the handwritten part of the writing is not very good, and even thought he was cool, the result is still given.
Second interview
I was very happy when I received a call from HR for a second interview the next day. The second interview was a cross-interview with an older interviewer. Because it was at night, I can’t remember many of the questions clearly.
Unlike the first interview, when you have been talking to the second interview about the project for a while, you can just say what you have to say according to your situation.
- What is the options request? What does it do?
- What is the principle of CDN and at what layer of the network does it play a role?
- How is project performance optimized?
- I mainly from the network, cache, JS, CSS, interface merge and so on several aspects, this topic is relatively broad, can play by oneself.
- Dynamically create script tags and insert them into the page, saying when to execute
- I’ll give you a string like “A2B3”, output “AABBB”
- C4(A(A3B)2)2, with nesting, these two problems are not the original problem, but similar
- Write a curry and ask add(1)(2)(3)(4) to print 10
- At first, I wrote add(1)(2)(3)(4)(). The interviewer asked me if I could remove the last (). Finally, he asked me for a hint about how console.log prints functions.
I’m sure the second interview asked more than the above questions, but that’s all I can remember…
I finally asked the interviewer about the business for the second time, and he said you should ask the interviewer for the third time. At that time, I knew it was over, haha.
Three sides (cool)
Yes, the first three cool, even received the interview failed email, I will talk later, see the problem first.
- What is the difference between a loader and a plugin?
- Webpack packaging optimization, I also mentioned Vite, by the way, vite
- Small program principle, and Taro principle
- XSS and CSRF
- http2
- The Tree Shaking principle
- Longest string of subroutines
- Addition of large Numbers
This interview is very fast, because indeed many did not answer, after the face I know, the end of 😭.
On three sides
A few days later, HR called me and told me to have a new interview with a new leader. The reason was that I performed well in the first and second aspects. Later, I found out that the real reason was that my current leader insisted on hiring me.
- We talked about a lot of engineering-related issues, mainly the whole process from development to launch of the project. After the conversation, he also pointed out some imperfections in the process I mentioned.
- React fiber
- http2
- The Tree Shaking principle
- Project optimization and network optimization
- Maximum return on stock
- Addition of large Numbers
In fact, before this interview, the interviewer made me wait for 10 minutes specially, I think it was to read the questions I had not written down before, so the three questions I asked specifically overlapped with the first time.
conclusion
Come in after the leader and said my home because I feel I have potential, he also pointed out that in fact I interview performance is not very good, there are still a lot of can continue to improve, he said that the best are from flooding, the first time you didn’t answer, if you are a good person, the second time you will be able to answer up, Thank you very much to my current leader.
If you are like the author, with little work experience and insufficient education background, you are afraid of being rejected by big factories and want to wait a few years to apply, THEN I suggest you don’t have to. With the increase of your work experience, the big factories will increase their requirements on you. Are you sure that your growth rate can keep up with the big factories’ requirements on you? The best time to plant a tree was ten years ago, followed by now.
Write in the last
The author is currently working in the e-commerce department of Bytedance-Douyin. The team has many HCS in Beijing and Shanghai. If you are interested, please send your resume to [email protected] or add my wechat suchangvv to contact me for internal promotion. May you all find your dream job.