Summary
Today's headline interview is not a general problem.
The front two sides are fine. side JS basic data type say ES6 new specification, I said let Const arrow function also has promise, ES6 Module. How to implement ES6 module, I said using a closure to implement a module. The project uses to react, says react. React performance optimization algorithm before the written test, to find two integer array of the same number, then thought of using a hash table to scan, and then compare the next array is the same number of common search methods, sequential table lookup, binary lookup, hash lookup, the time complexity of their respective. Notice the search of the binary tree, the time complexity is O (h), the height of the tree.
AVL is the implementation of O (LgN) hash table: hash function implementation-except residue method, direct addressing method, digital analysis method, etc. How to resolve Conflicts: Open address method (linear detection, square detection,), separated link method, double hashing, and then hashing algorithm two: the headline likes to ask this:
An unordered, repeating array from which the number of n is removed, and how many of the combinations of this n and M. Two sides
A brief introduction to the project
1. Ask my project, why use the background scrolling, if it is more than one wizard object to scroll how to handle. (Still the same)
2. Still ask some details of another project (be familiar with your own project)
3. Say from the input URL, what happened, in the context of HTTPS, a little bit of the SSL handshake. The role of digital signature digital certificates. Why we need HTTPS, why it is safe.
4. Function throttling How to design, drag events, do not need to trigger frequently, and every time the trigger. Implementation of function throttling.
5. The design of a certified program, the program to avoid landing. At the beginning of the cookie+session, always asked me how to generate this information, I said that in the server generation, information stored in the database, through the HTTP response Set-cookie return a cookie, set its expiration time expire and so on, and then transferred back to the client, The cookie is brought on each request after the client. Back security, I said MD5, he said irreversible not.
The back interviewer told me to use token, we do not need to actually put the user's information in the cookie, we put the user name and other information can use asymmetric encryption algorithm, encrypted to get a random string, this is token then there is a client, Each time you send to the server you can decrypt the token to get this information.
6.React Dom diff algorithm details for virtual DOM. How to influence the document.write of the document by the three-side two logical reasoning questions
Compare the difference between the time it executes in onload and the timing of the document creation
3. Design a projectile screen, how to optimize. Need to consider Renderlayer, I told him Canvas write KMP algorithm out