Wechat official account: Xu Gong Code word (Stormjun94) source :github.com/gdutxiaoxu/…

preface

Nowadays, if you want to enter Dachang, Tencent, Ali, Toutiao, Pinduoduo, etc., no matter it is social recruitment or school recruitment, you will definitely be interviewed by the algorithm.

I believe many people have such an idea, the interview early rocket, work when the screw. Yes, this is very common, and I agree. But there is no way, who told us to want to enter the big factory, the initiative is in the hands of others.

Still, the situation is understandable. How do you determine the level of the candidate in several rounds of interviews? It’s got to be algorithms, fundamentals, principles.

Although these can not represent all, but at least to some extent can represent the level of competence of the interviewer. After all, programming languages can be thought of, but data results and algorithmic capabilities are the core. Once you’ve mastered the principles, the programming mindset, switching to another language is actually pretty quick. That’s why interviewers like to examine algorithms and principles.

As for how to learn the algorithm, let me generalize briefly. Okay

  1. First, to understand the basic data results, array, chat table, Map, Set, binary tree, etc., understand their advantages and disadvantages, time complexity, space complexity, etc
  2. Second, to master some common algorithms, recursion, iteration, eight sorting, binary search, greedy algorithm and so on
  3. Third, to master an algorithm, not only know what, but also know why (analyze the advantages and disadvantages of various algorithms), such as topK problem, there are several common solutions, sorting, quick sorting, mass data heap sorting
  4. At the beginning of learning, it may be difficult, you can brush the questions first, slowly find the feeling, from easy to difficult. For example, the first day, you brush this algorithm when you don’t understand, don’t worry, a lot of people are coming over like this, first search the answer, see how others are solving. After you understand it, write it again and run it again. It’s important, a lot of times, you think you know it, but you can’t write it when you’re writing it, and when you’re writing it, it’s going to reinforce your impression. The next day, oneself write again, deepen impression
  5. Learning algorithm is not a day’s work, need long-term accumulation. The recommended practice is to do one or two questions a day, not many questions, but understanding. Stick with it for a month or two, and you’ll start to feel better.

Unconsciously said a lot of, another day when free to write an article, how to learn algorithm, and sorting algorithm common topics. If you are interested, you can follow my wechat public account, Xugong Mizi (Stormjun94).

Now we start to get to the topic. This issue sorted out all the algorithm topics of sword finger offer, all implemented in Java language. If you think it is helpful to you, welcome to github to help me star, thank you, your support is the biggest motivation for my writing.

Github.com/gdutxiaoxu/…

directory

  • Android based
    • JVM and class loading mechanism. Md
    • HTTP and HTTPS. Md
    • Android interview essentials – System, App, Activity startup process. Md
    • Android interview Essentials – Thread. Md
    • Android interview essential – Computer network basic knowledge. Md
    • Basic knowledge of computer networking (TCP, UDP, Http, HTTPS).md
    • Interviewer Series – Do you really know HTTP? Md
    • The interviewer asks, is HTTPS really secure, can you capture packets, and how to prevent packet capture. Md
  • The sword refers to offer
    • [Java] offer(1) find duplicate numbers in array
    • [Java] Finger offer(2) find duplicate numbers without modifying array
    • [Java] search in offer(3) 2d array
    • [Java] offer(4) replace blank
    • Print the list from end to end
    • [Java] offer(6) rebuild binary tree
    • [Java] indicates the next node of the offer(7) binary tree
    • (8) Implement queue with two stacks
    • 【Java】 offer(9) Fibonacci sequence and frog jump step problem
    • [Java] finger offer(10) Rotates the smallest number in the array. Md
    • [Java] indicates the path in the offer(11) matrix
    • [Java] offer(12) Range of motion of robot
    • 【Java】 offer(13) cut the rope
    • 【Java】 the number of 1’s in offer(14) binary
    • [Java] offer(15) integer power of value md
    • [Java] Finger offer(16) Prints 1 to the maximum number of n digits. Md
    • [Java] offer(17) deletes linked list node at O(1) time
    • 【Java】 offer(18) remove duplicate nodes from linked list
    • [Java] Offer (19) Regular expression matching
    • [Java] string indicating value of offer(20)
    • 【Java】 offer(21) adjusts the order of the array so that the odd number precedes the even number
    • 【Java】 sword refers to the KTH node of offer(22) linked list
    • [Java] entry node in offer(23) list
    • 【Java】 sword finger offer(24) reverse linked list. Md
    • 【Java】 offer(25) merges two sorted lists
    • [Java] substructure of offer(26) tree
    • [Java] a mirror image of offer(27)
    • [Java] offer(28) symmetric binary tree
    • [Java] Finger offer(29) prints matrix clockwise. Md
    • [Java] offer(30) contains a stack of min functions. Md
    • 【Java】 a sequence of offer(31) on a stack
    • [Java] Finger offer(32) print binary tree from top down. Md
    • [Java] postorder traversal sequence of offer(33) binary search tree
    • [Java] a path in a binary tree where offer(34) is neutral to a value
    • [Java] Duplicate offer(35) complex list. Md
    • [Java] Offer (36) Binary search tree and bidirectional linked list. Md
    • 【Java】 sword finger offer(37) serialized binary tree
    • [Java] arrangement of offer(38) strings. Md
    • [Java] indicates a number that occurs more than half The Times in the offer(39) array
    • [Java] minimum number of offer(40). Md
    • [Java] median of offer(41) data stream. Md
    • [Java] finger offer(42) maximum sum of consecutive subarrays. Md
    • [Java] Offer (43) number of occurrences of 1 in an integer from 1 to n. Md
    • Md 【Java】 a digit in the numeric sequence of offer(44)
    • [Java] offer(45) set array to smallest number
    • 【Java】 offer(46) translate numbers into strings
    • 【Java】 the maximum value of an offer(47)
    • [Java] Offer (48) longest non-repeating substring. Md
    • [Java] the first character in the offer(50-1) string that occurs only once. Md
    • [Java] the first character in the offer(50-2) stream that occurs only once. Md
    • [Java] reverse pair in offer(51) array. Md
    • [Java] offer(52) the first common node of two lists
    • 【Java】 The number of times a number appears in a sorted array
    • [Java] offer(53-2)0 to n-1
    • [Java] an element in the offer(53-3) array with equal values and subscripts
    • [Java] offer(54) the k node of the binary search tree
    • [Java] offer(55-1) depth of binary tree. Md
    • 【Java】 finger offer(55-2) balanced binary tree. Md
    • [Java] two numbers that appear only once in the offer array. Md
    • [Java] a unique number that occurs only once in the offer array. Md
    • [Java] offer(57-1) and s
    • [Java] offer(57-2) is a sequence of consecutive positive numbers of S
    • [Java] flip word order of offer(58-1) md
    • [Java] pointing to offer(58-2) left rotation string. Md
    • [Java] Finger offer(59-1) maximum number of sliding Windows. Md
    • [Java] Indicates the maximum value of the offer queue (59-2). Md
    • 【Java】 offer(60)n dice
    • 【Java】 offer(61) card
    • [Java] indicates the last remaining number in the offer(62) circle. Md
    • [Java] maximum profit from offer(63) stock
    • 【Java】 offer(64) 1+2+… +n.md
    • 【Java】 offer(65) without addition, subtraction, multiplication and division
    • [Java] Construct product array with offer(66)
    • [Java] offer(67) converts string to integer. Md
    • [Java] the lowest common ancestor of two nodes in the offer(68) tree

digression

Finally, if you are interested, you can follow my wechat official account. The warehouse will be updated constantly, mainly about the interview. Interview experience, algorithms and so on.

Github.com/gdutxiaoxu/…

Scan and pay attention to my wechat public number stormjun94, knock code together, blow water together, write their own life.