[Front-end interview questions]

layout

Center vertically

Two column layout, fixed width on the left side

flex layout properties

js

js array processing method

promise because the icon will be sent synchronously

performance

What is reflow and redraw?

What operations will cause reordering?

Map (not map

network

How does cross-domain arise?

Communication request protocol type

Limitations of get requests

Where does get put the parameters in url?

Is there a limit to url length?

The security of get, compared with post

Get request header settings, how to use content-type

Anti-shake and throttling

Vue

What is the role of scoped? Is there any other way to achieve similar effects?

v-if 和 v-show

The difference between computed and watch

During the compilation process, what is the difference between the two?

v-show can be compiled up to several times

What are the methods for routing jumps in Vue?

Is the route in history or hash mode?

The difference between v-if and v-show

What can v-model syntax sugar be written as?

Your advantages, professional courses and so on

data structure

Space complexity when sorting

Is the time complexity of quick sort stable? How to understand whether it is stable or not?

Is quick sort stable?

Find binary search

Binary tree traversal method recursion or recursion?

4 basic structures

Array question

Given an integer array nums and an integer target value target, please find the two integers in the array whose sum is the target value target and return their array subscripts.
You can assume that each input will correspond to only one answer. However, the same element in the array cannot appear repeatedly in the answer.
You can return answers in any order.
Input: nums = [2,7,11,15], target = 9
Output: [0,1]
Explanation: Because nums[0] + nums[1] == 9, [0, 1] is returned.

My answer: sort first, loop through the 2 levels, and break once found;
the interviewer optimized: sort, but you can add the first pointer; because your method will not break a lot when the target is large.

Binary tree

Given the root node root of a binary tree, return its inorder traversal.

/**
 * Definition for a binary tree node.
 * function TreeNode(val, left, right) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.left = (left===undefined ? null : left)
 *     this.right = (right===undefined ? null : right)
 * }
 */

ECharts

Introduce its special method

Guess you like

Origin blog.csdn.net/weixin_63681863/article/details/132755543