preface

Article sharing collection of Baidu, Ali, Tencent front end (internship) interview questions. There are “[269 pages] front-end factory interview questions”, the main content summary: HTML, CSS, JavaScript, HTTP, TCP protocol, browser, Vue, data structure and algorithm.

Baidu (Internship)

  • position
  • Bind, apply, call
  • Write a bind
  • BFC
  • csrf
  • Cross domain
  • The diff algorithm
  • Virtual DOM
  • Units (like PX, REM, EM, vw, etc.)
  • SSR (How to implement)
  • Ua and media query
  • OSI seven layer model
  • Browser caching mechanism
  • How to implement strong cache, negotiated cache in the project
  • Event loop
  • Let, var, const
  • How to design the React component
  • Component communication mode
  • The git command
  • Git revert: A, B, C, D delete a commit from C.
  • JWT
  • The big four stores and sessions
  • rem
  • What are the methods of deep copy
  • A method to implement waterfall flow
  • Achieve the effect of animation
  • Handwritten deep copy

Ali (Internship)

  • What projects have you done?
  • What techniques do you usually use
  • Introduce the difficulties of the project
  • What do you think about front-end engineering
  • Negotiate the cache
  • The priority of the selector
  • What features does ES6 touch on?
  • So, how do you implement middle order traversal
  • Bubbling and capturing of events
  • What’s the difference between thread and process?
  • Is the CSS horizontally and vertically centered?
  • How to implement queue with stack?
  • Microtasks and macrotasks?
  • Object oriented and process oriented?
  • How is Vue data responsive implemented?
  • Properties in flex layout?
  • Binary search
  • JS data type?
  • How to determine the data type when you get a variable?
  • Do you understand the prototype chain?
  • How to implement inheritance?
  • TCP three handshake okay? Can we have two handshakes instead?
  • What are the HTTP status response codes?
  • Process communication mode?
  • What sort algorithms are there?
  • The time complexity of bubble sort?

Tencent (Internship)

  • Talk about the project
  • A method that an array can call
  • Closures, disadvantages
  • ES5 implements LET, and closures implement LET
  • The binary tree is constructed according to middle order and post order
  • Judge valid parenthesis
  • Talk about the vUE responsive principle
  • Are there any downsides to HTTP
  • What happens when the browser enters the URL and sees the page
  • MVC MVVM pattern
  • CSS layout
  • JS dynamically loads scripts
  • What about cookies?
  • New ES6 features
  • What’s the difference between an arrow function and a normal function?
  • Talk about the closure
  • Es6 array deduplication method
  • How to determine the data type? What’s the difference
  • Deep copy
  • Implementation of a two-column layout
  • Anti – shake and throttle difference
  • What are the ways of inheritance? Superior to domestication?

[page 269] Interview questions for a large front-end factory

HTML
  • Semantic HTML
  • Canvas related
  • What’s the difference between SVG and Canvas?
  • What’s new in HTML5?
  • How to deal with the browser compatibility of HTML5 new tags?
  • Talk about the title and Alt attributes
  • What are HTML global attributes

CSS
  • How many ways can you center an element horizontally and vertically?
  • What are the advantages of floating layouts? What are the disadvantages? What are the ways to clear floats?
  • What is the problem with using display:inline-block? The solution?
  • Layout: The div is vertically centered around 10px and always half the width
  • The box model
  • How does the CSS implement the character layout?
  • How does CSS do the Holy Grail layout
  • How does the CSS implement a dual-wing layout?
  • What is BFC?
  • The trigger condition
  • BFC rendering rules
  • Application scenarios
  • .

JavaScript
  • What are the JS primitive data types? What are the reference data types?
  • Is NULL an object? Why is that?
  • Why can ‘1’.toString() be called?
  • Why doesn’t 0.1+0.2 equal 0.3?
  • What is a BigInt? Why BigInt?
  • How to create and use BigInt?
  • Does typeOF determine the type correctly?
  • Can instanceof determine basic data types?
  • Can you implement instanceof manually?
  • Object. Is differs from ===?
  • [] = =! [] What was the result? Why is that?
  • What types of conversion are there in JS?
  • What’s the difference between == and ===?
  • What is the process by which objects are converted to primitive types?
  • If (a == 1 &&a == 2)
  • What is a closure?
  • What causes closures?
  • What are the representations of closures?
  • How to solve the following loop output problem?
  • What is the relationship between a prototype object and a constructor?
  • Can you describe the prototype chain?
  • How does JS implement inheritance?
  • Function arguments are not arrays. How do I convert it to an array?
  • Does return work in forEach? How do I break the forEach loop?
  • JS determines whether an array contains a value
  • JS flat- array flat
  • Higher-order functions in arrays
  • Is it possible to implement array map methods?
  • Can you implement array Reduce?
  • Can I write a full deep copy?
  • How is data stored?
  • How does the V8 engine recycle garbage memory?
  • Describe the process by which V8 executes a piece of JS code?
  • Macrotasks are introduced
  • The main differences between NodeJS and browsers regarding eventLoop
  • How is asynchronous, non-blocking I/O implemented in NodeJS?
  • What are the schemes for ASYNCHRONOUS JS programming? Why do these schemes exist?
  • Can we simply implement the node callback mechanism?
  • With what did Promise kill callback hell?
  • How does Promise implement chain calls?
  • Now Promise’s All and Race
  • Explain how async/await works
  • .

HTTP
  • What is the structure of HTTP packets?
  • What are HTTP request methods?
  • What’s the difference between GET and POST?
  • How to understand URIs?
  • How to understand HTTP status codes?
  • What are the features of HTTP? What are the disadvantages of HTTP?
  • What do you know about the Accept series fields?
  • How does HTTP transfer data of fixed and variable length?
  • How does HTTP handle transfer of large files?
  • How is submission of form data handled in HTTP?
  • How does HTTP1.1 address HTTP header blocking?
  • What do you know about cookies?
  • How to understand HTTP proxies?
  • How do you understand HTTP caching and caching proxies?
  • Why is proxy caching created?
  • Cache control for the source server
  • Client cache control
  • What is cross-domain? How does the browser intercept the response? How to solve it?
  • .

TCP protocol
  • Can you explain the difference between TCP and UDP?
  • How about the TCP three-way handshake?
  • Why three times instead of two or four?
  • Can you carry data during a three-way handshake?
  • Talk about how TCP waves four times
  • Why four waves instead of three?
  • This section describes the fields in the TCP header
  • TCP fast Open (TFO)
  • What is the function of timestamp in TCP packets?
  • How is the TCP timeout retransmission time calculated?
  • Talk about TCP traffic control
  • What about TCP congestion control?
  • .

The browser
  • What about browser caching?
  • What about browser local storage? What are the pros and cons?
  • What happens from entering the URL to rendering the page? (network)
  • Talk about your understanding of redraw and reflux
  • Can you talk about XSS attacks?
  • Why does HTTPS make data transfer more secure?
  • Can we achieve event stabilization and throttling?
  • Can you achieve lazy loading pictures?

Vue
  • What is MVVM?
  • MVVM vs. MVC? What distinguishes it from other frameworks (jquery)? Which scenarios fit?
  • Value transfer between components?
  • Vue bidirectional binding principle
  • Describe the process of vUE from initialization page – modify data – refresh page UI?
  • Virtual DOM implementation principle
  • What is the function of the key value in Vue?
  • Vue life cycle
  • How do Vue components communicate with each other?
  • How to reset data in VUE?
  • What does the write name option do in the component?
  • What hook functions does vue-router have?
  • What is the difference between a route and a router?
  • React Vue and React React
  • How does Vue’s nextTick work?
  • What are the attributes of Vuex?
  • .

Data structures and algorithms
  • The list
  • The stack and queue
  • Binary tree

The list

  • Simple reverse linked list
  • Interval inversion
  • Flip linked lists in pairs
  • Flip linked lists in groups of K
  • How do I detect linked lists forming rings?
  • How do I find the beginning of the ring
  • Merges two ordered lists
  • Merge K ordered linked lists
  • Judge palindrome lists

The stack and queue

  • Effective brackets
  • Multidimensional array flatten
  • Ordinary hierarchical traversal
  • Zigzag level traversal of binary trees
  • Right view of a binary tree
  • Perfect square
  • randomly
  • Priority queue
  • Notes on stacks
  • Implement a maximum heap
  • Implementing priority queues
  • The first K high frequency elements
  • Merge K sorted linked lists
  • What is a double-endian queue?
  • Maximum sliding window
  • Stack implementation queue
  • Queue implementation stack

Binary tree

  • Pre-order traversal/mid-order traversal/post-order traversal
  • Maximum depth/minimum depth
  • Symmetric binary tree
  • The most recent common ancestor of a binary tree
  • The diameter of a binary tree
  • All paths to a binary tree
  • The maximum path sum of a binary tree

.

The full PDF version of the 2021 front-end Bytedance real questions analysis (including questions and analysis) is available for free.

[page 90] 2021 Front-end Bytedance