Three sides of the byte: Architecture and framework are talkative but algorithmic. Why do well-known IT companies have to test algorithms whether they are written or computerized?

Why do major manufacturers pay attention to algorithms?

Tencent, Baidu Ali and other domestic first-line companies will focus on algorithms and data structures in the process of recruiting engineers. However, the algorithm is easy to learn and difficult to master, which discourages many programmers. In the interview, they always fail at the algorithm level and cannot get a good offer.

During the interview, many candidates talked about the architecture and framework, but once they wrote the code, they revealed their true level. To put it bluntly, the basic skills are not solid enough.

In fact, no matter what language you are, the basic skills must be solid, and the core must be data structures and algorithms. For this reason, all major interviews must take algorithmic questions.

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

have to be aware of is:

  • An algorithm is not purely about IQ, but a skill, an ability that can be trained in a scientific and reasonable way.
  • To learn algorithms, it’s impossible to scribble the questions recklessly, you need to follow the scientific method. Algorithm training is a systematic project, and it must be done step by step. Too fast for quick success will lead to frustration and counter-effects due to failure to solve the problem.

When preparing for the interview stage, you should perform classification training according to LeetCode's algorithm knowledge points, and then review the hot topics that have begun for each company. Finally, focus on the problems that you don’t usually do well.

In terms of algorithms, the reference documents I use have always been the algorithm documents of Teacher Zuo, and the group of programmers also has a pyramid structure. If you don’t even know the basic algorithm and data structure, it is basically at the bottom level. The bottom level means low salary . Therefore, it is very important to master the algorithm. If you want to quickly master the algorithmic problem solving skills, then the following document It must be suitable for you! I hope every diligent "program installer" can get his satisfactory offer!

Programmer code interview guide

Chapter 1 Stacks and Queues

  1. Design a stack with getMin function
  2. Queue consisting of two stacks
  3. How to reverse a stack using only recursive functions and stack operations
  4. Cat and dog queue
  5. Use one stack to implement another stack sorting
  6. Use stacks to solve the Tower of Hanoi problem
  7. Generate window maximum array
  8. Construct an array of MaxTree
  9. Find the size of the largest submatrix
  10. The maximum value minus the minimum value is less than or equal to the number of sub-arrays of num

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 2 Linked List Problems

  1. Print the common part of two ordered linked lists
  2. Delete the Kth node from the bottom in singly-linked and double-linked lists
  3. Delete the intermediate node of the linked list and the node at a/b
  4. Reverse one-way and doubly linked lists
  5. Reverse part of a singly linked list
  6. Joseph's Problem of Circular Singly Linked List
  7. Determine whether a linked list is a palindrome structure
  8. Divide the singly linked list according to a certain value into the form of small left, equal middle, and large right
  9. Copy the linked list with random pointer nodes
  10. Two singly linked lists generate an additive linked list
  11. A series of problems about the intersection of two singly linked lists
  12. Reverse the order between every K nodes of the singly linked list
  13. Delete nodes with repeated values ​​in the unordered singly linked list
  14. Delete the node of the specified value in the singly linked list
  15. Convert the search binary tree into a doubly linked list
  16. Selection sort of singly linked list
  17. -A weird way to delete nodes
  18. Insert a new node into an ordered circular singly linked list
  19. Merge two ordered singly linked lists
  20. Reassemble the singly linked list in the left and right half

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 3 Binary Tree Problem

  1. Recursively and non-recursively implement binary tree pre-order, middle-order and post-order traversal
  2. Print the boundary nodes of the binary tree
  3. How to print a binary tree more intuitively
  4. Serialization and deserialization of binary trees
  5. God-level method to traverse binary trees
  6. Find the longest path length whose cumulative sum is the specified value in the binary tree
  7. Find the largest search binary subtree in the binary tree
  8. Find the largest topological structure in the binary tree that meets the criteria of the search binary tree
  9. Layer-by-layer printing and ZigZag printing of binary tree
  10. Adjust search for two wrong nodes in the binary tree
  11. Determine whether the t1 tree contains all the topological structure of the t2 tree
  12. Determine whether there are subtrees in the t1 tree that have the same topology as the t2 tree
  13. Determine whether the binary tree is a balanced binary tree
  14. Generate balanced search binary tree through ordered array
  15. Find the successor of a node in the binary tree
  16. Find the nearest common ancestor of two nodes in the binary tree
  17. Tarjan algorithm and union query set to solve the batch query problem of the nearest common ancestor between binary tree nodes
  18. The maximum distance between binary tree nodes
  19. Reconstruct binary tree by combining two-by-two arrays of pre-order, middle-order and post-order
  20. Generate post-order arrays from pre-order and middle-order arrays
  21. Count and generate all different binary trees
  22. Count the number of nodes in a complete binary tree

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 4 Recursion and Dynamic Programming

  1. Recursion and dynamic programming of Fibonacci series of problems
  2. The minimum path sum of the matrix]
  3. Minimum amount of currency to exchange money
  4. Number of ways to exchange money
  5. Longest increasing subsequence
  6. Tower of Hanoi
  7. Longest common subsequence problem
  8. Longest common substring problem
  9. Minimum editing cost
  10. Interleaved composition
  11. Dungeons and Dragons game problems
  12. The number of character strings converted into letter combinations
  13. The number of components of the expected result of the expression
  14. Arranged-in-line card game problem
  15. Jumping game
  16. The longest consecutive sequence in the array
  17. N queen problem

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 5 String Problems

  1. Determine whether two strings are inflections
  2. The sum of number substrings in a string
  3. Remove the substring with k consecutive 0s in the string
  4. Determine whether two strings are mutually rotating words
  5. Convert integer string to integer value
  6. Replace the specified string that appears consecutively in the string
  7. String statistics string
  8. Determine whether all characters in the character array appear only once
  9. Find a string in an ordered but empty array
  10. String adjustment and replacement
  11. Reverse string
  12. The minimum distance between two strings in the array
  13. Add the least characters so that the entire string is a palindrome string

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Brother who needs this algorithm document, please help like forwarding and follow the editor to support it, and then private message [666] to get the method

Chapter 6 Big Data and Space Limits

  1. Understanding Bloom Filter
  2. Use only 2GB of memory to find the most frequent number among 2 billion integers
  3. Find the missing number among 4 billion non-negative integers
  4. Finding duplicate URLs in 10 billion URLs and the top K problem of search terms
  5. Find the number that appears twice and the median of all numbers among 4 billion non-negative integers
  6. -The basic principle of consistent hashing algorithm

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 7 Bit Operations

  1. No additional variables are used to exchange the values ​​of two integers
  2. Find the larger of the two numbers without any comparison and judgment
  3. Only use bit operations without arithmetic operations to achieve integer addition, subtraction, multiplication and division operations
  4. How many 1s are there in the binary representation of an integer
  5. Find the odd number of occurrences in the array where other numbers appear even number of times
  6. Find a number that appears only once in an array where other numbers appear k times

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 8 Array and Matrix Problems

  1. Circle printing matrix
  2. Turn the square matrix top clockwise by 90°
  3. "Zigzag" printing matrix
  4. Find the smallest number of k in the unordered array
  5. Scan the E picture by hand in March to get the most array length
  6. Find the number of occurrences greater than N/K in the array
  7. Find numbers in a matrix with all rows and columns in order
  8. The length of the longest integrable sub-array
  9. Do not repeat print all the doubles and triples in the sorted array whose sum is a given value
  10. The length of the longest sub-array whose cumulative sum is a given value in an unsorted positive array
  11. The problem of the longest sub-array series with cumulative sum without given value in unsorted array
  12. The length of the longest sub-array whose cumulative sum is less than or equal to a given value in an unsorted array
  13. Calculate the small sum of the array
  14. Sorting of arrays of natural numbers
  15. Odd subscripts are all odd or even subscripts are even)
  16. Maximum cumulative sum of sub-arrays
  17. The maximum cumulative sum of submatrices
  18. Found in the array-a local minimum position
  19. Maximum cumulative product of sub-arrays in an array
  20. Print the largest TopK of N arrays
  21. Maximum square size with borders of 1
  22. The cumulative array that does not contain the value of this position
  23. Array partition adjustment
  24. Find the shortest path value
  25. The smallest positive integer that does not appear in the array
  26. The maximum difference between adjacent numbers after the array is sorted

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Chapter 9 Other Topics

  1. From 5 random to 7 random and its expansion
  2. -Line code to find the greatest common divisor of two numbers
  3. Two questions about factorial
  4. Determine whether a point is inside the rectangle
  5. Determine whether a point is inside the triangle
  6. Origami problem
  7. Reservoir algorithm
  8. Design a hash table with setAll function
  9. The absolute value of the difference between the largest leftMax and rightMax
  10. Design a cache structure that can be changed
  11. Design RandomPool structure
  12. Adjust the probability of occurrence of a number on the interval (0 ,x)
  13. Path array becomes statistical array
  14. The smallest non-composable sum of an array of positive numbers
  15. -Kind of correspondence between strings and numbers
  16. Number of occurrences of 1 from 1 to n
  17. Print M numbers with medium probability from N numbers
  18. Determine whether a number is a palindrome
  19. Find the smallest value in an ordered rotated array
  20. Find a number in the ordered rotated array
  21. Numbers in English and Chinese
  22. Candy problem
  23. -A structure design for receiving and printing messages
  24. Design a heap structure without the burden of expansion
  25. Find the median of the data stream at any time
  26. Find the upper median in two sorted arrays of equal length
  27. Find the Kth smallest number in two sorted arrays
  28. TOPK problem of adding and sum between two ordered arrays
  29. TOPK problem of occurrence
  30. Manacher algorithm
  31. KMР algorithm
  32. Chess piece problem
  33. Painter problem
  34. Post office location problem

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Architecture and framework talk about algorithms freely?  Read through this note to easily master algorithm skills

 

Write at the end

Nowadays, algorithm questions are mandatory for major domestic and foreign IT companies whether it is written or computerized. This document is all dry goods, as an interview tool, explain the profound things in a simple way, with a targeted. It is a rare exam preparation manual for both veterans in the workplace and fresh graduates who are new to the workplace. Teacher Zuo also has the experience of studying abroad and famous domestic and foreign companies, loves and is proficient in algorithms, and deepens the "gulf" between the needs of well-known companies and the lack of ability of job applicants. This document is just a "bridge" connecting the two. It is the best algorithm note I have ever read, I highly recommend it!

Brother who needs this algorithm document, please help like the article and follow the editor to support it. Add the assistant vx to get the method

Guess you like

Origin blog.csdn.net/weixin_50205273/article/details/108941168