After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

The beginning of the article introduces an interviewer’s requirements for the interviewer:

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Former Meituan Senior Engineer Windy

As an interviewer, I am more concerned about the candidate's industry background, professional skills and some soft qualities. Specifically:

  • The industry background is the field of the previous job, such as e-commerce, social networking, etc.;
  • Professional skills are mainly based on language, knowledge of high concurrency, distribution, middleware, etc., as well as the ability to troubleshoot problems, operation and maintenance, and design. The most important thing here is programming ability, and architecture ability is also examined for senior positions.
  • Soft qualities include candidates’ communication skills, project management skills, and leadership.

As an interviewer, during the interview, I will use written test questions to examine the candidate’s thinking and logic ability . The specific knowledge points usually examined include linked lists, trees, sorting, binary search, etc., which require candidates to be able to analyze the time complexity of different algorithms Degree and space complexity. For the questions I will choose the simple to medium difficulty questions on LeetCode. The frequently tested ones are:

  • Single linked list flip (recursive or circular)
  • Traversal of the tree
  • Dynamic planning (stair climbing and deformation problems, Fibonacci sequence, stock problems)
  • Binary search (and deformation)
  • Sort (Quick Sort)

Through the investigation of algorithmic interview questions, I hope that candidates can not only demonstrate their programming skills , but also demonstrate their communication skills and deduction skills (how to construct ideas) by understanding the topics in detail . The most critical programming ability, candidates can show their thinking about the boundary of the problem , compare the performance and efficiency of different methods, and give a variety of ways to solve the problem.

My selected algorithm interview question is: search a two-dimensional matrix

Write an efficient algorithm to determine whether there is a target value in the mxn matrix. The matrix has the following characteristics:

The integers in each row are arranged in ascending order from left to right.

The first integer in each line is greater than the last integer in the previous line.

Example 1:

输入: 
matrix = [ 
  [1, 3, 5, 7], 
  [10, 11, 16, 20], 
  [23, 30, 34, 50] 
] 
target = 3 
输出: true 

Example 2:

输入: 
matrix = [ 
  [1, 3, 5, 7], 
  [10, 11, 16, 20], 
  [23, 30, 34, 50] 
] 
target = 13 
输出: false 

Interview focus-algorithm

In 2020, friends who have interviewed big factories will find that all big factories are asking about algorithms. Based on the information they currently have, they will speculate that algorithms will be a big outlet, and those who master algorithms can easily crush those who can’t. Get an offer!

In the future, algorithms will not only be interviewed by large companies, but small and medium-sized companies will also ask about algorithms in interviews. This is a trend!

In order to help you improve your algorithm skills, I have collected and sorted out some very nice algorithm notes for everyone. Due to platform reasons, only part of the screenshots can be displayed. Interested friends can help you with one-click three consecutive times. See the picture below and add a small assistant VX. (Gyhycx7980) can be obtained for free!

first set

The contents of this note are all purely hand-written. The code of the sorting algorithm/data structure may not be the optimal solution. The implementation of the code is written in a way that is easier to understand. Almost every code has a corresponding comment, which should be understandable.

Catalog overview

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Brief description of content

One, bubble sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Second, select sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Three, insertion sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Four, quick sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Five, merge sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Six, Hill sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Seven, heap sort

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

8. Cardinality sorting (bucket sorting)

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Nine, recursion

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Ten, linked list

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

11. Stack

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

12. Queue

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Thirteen, binary tree

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Second note

Professional brushing notes...

Dynamic Planning Topics

LeetCode: 695. The largest area of ​​the island

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 474. One and zero

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 1314. Matrix area and

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 714. The best time to buy and sell stocks includes handling fees

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 1130. Least cost spanning tree with leaf value

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Double pointer topic

LeetCode: 11. The container that holds the most water

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 287. Find the number of repetitions

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Binary search topic

LeetCode: 378. The Kth smallest element in an ordered matrix

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 1337. The weakest K line in the phalanx

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Greedy Algorithm Topics

Linked list topic

Breadth-first search topics

Depth-first search topics

……

LeetCode: 513. Find the value in the lower left corner of the tree

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

LeetCode: 129. Find the sum of the numbers from the root to the leaf node

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Third note

"Code Interview Guide for Programmers, Optimal Solutions to Top IT Companies' Algorithms and Data Structures" written by Zuo Shen

The books involve more than 240 questions about algorithm and data structure programming, and the individual has achieved the best solution. Most of the questions are frequently interviewed.

Directory (the algorithm is divided into four levels: general, school, lieutenant, and scholar to indicate the degree of difficulty)

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Chapter 1 Stacks and Queues

Design a stack with getMin function (person ★)

A queue consisting of two stacks (Wei ★ ★)

How to use only recursive functions and stack operations to reverse a stack (Wei★★)

Cat and dog queue (person ★)

Use one stack to implement the sorting of another stack (士★)

Use the stack to solve the Tower of Hanoi problem (school ★ ★ ★)

Generate an array of window maximum values ​​(Wei★★)

Construct an array of MaxTree (school ★★★)

Find the size of the largest sub-matrix (school ★ ★ ★)

The maximum value minus the minimum value is less than or equal to the number of sub-arrays of num (check ★★★)

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Algorithm video tutorial for free sharing (Easter egg)

Zuo Chengyun's video explaining the algorithm interview questions of major companies such as Toutiao, JD, Tencent, and Alibaba

After the three sides of the byte were hung up, the algorithm was madly brushed, and the Ali offer was accidentally obtained, and the rating was P6+

 

Due to the space of the platform, more content can't be displayed. If you are interested in one-click triple connection, please see the picture below and add the assistant VX (gyhycx7980) to get it for free!

Guess you like

Origin blog.csdn.net/GYHYCX/article/details/113407377