• Problem solving – string transformation 1 (greedy)


    String Transformation 1(Codeforces 659 Div.2 C) Div2 of codeforces is getting more and more difficult, qwq Hang up a link first- https://codeforces.com/contes/1384/problem/c Question surface – a total of several groups of data, each group of data contains a, B two length n string composed of a ~ t, you can select any number of the […]

  • Array of algorithms — sum of three numbers


    Sum of three numbers difficultysecondary Here is an array of N integersnums, judgmentnumsAre there three elements a, B, C in a such that a + B + C = 0? Please find all triples that satisfy the condition and do not repeat.be careful:The answer cannot contain duplicate triples. Example:Given array nums = [- 1, 0, […]

  • Algorithm | sorting


    Bubble sort By exchange: if the current element is larger than the next, the two elements are exchanged. The largest element in each scan area is in place java code public class Sort_Bubble { public void bubbleSort(int[] arr){ if (arr == null || arr.length<2) return; for(int len = arr.length-1; len>0; len–){ for(int i = 0; […]

  • Interviewer: do you know the time wheel algorithm? How is it applied in netty and Kafka? Why not use timers and delayed thread pools?


    In every era, people who can learn will not be treated badly Hello, I’m yes. Recently, I saw the time wheel algorithm in Kafka. I remember I saw this thing in netty before. I didn’t pay much attention to it. Today, let’s see what the time wheel is. Why do we use time round to […]

  • Equal assurance evaluation 2.0: windows security audit


    1. The function of security audit should be enabled. The audit covers every user and audit important user behavior and important security events Scheme: Open the local security policy in the management tool, open the path: security settings / local policy / audit policy, and configure all audit policies as success, failure. It includes audit […]

  • What is low code?


    Introduction:What is low code? Why do we need low code? Will low code make programmers lose their jobs? This paper summarizes the basic concepts, core values and industry status quo of low code field, and takes you to understand low code comprehensively. A preface If the key word “I believe in the new year 2020” […]

  • Linked list and stack


    Linked list Summary:1. The time complexity of adding, deleting and searching elements in the head of the linked list is O (1). If it is in other positions, the time complexity of the above operations is O (n).2. The efficient operation of the head element of the linked list meets the requirements of stack construction.

  • Array of data structure and algorithm series


    What is an array? Forget in which book I saw the sentence “understand the conceptual things, you will learn 70%” Back to the topic, what is an array?Array is a linear table data structure. It uses a continuous set of memory space to store a set of data of the same type There are two […]

  • Understand the origin of red black tree and understand the essence of red black tree


    preface This article is on the album:http://dwz.win/HjK, click to unlock more knowledge of data structures and algorithms. Hello, this is tongge. In the first two sections, we learned about the theory of skip table and handwritten two completely different implementations. Let’s put a picture to briefly review: The key to implement the skip table is […]

  • Everyone add cycle & induction


    Given a nonnegative integer num, the numbers on each bit are added repeatedly until the result is a single digit. Example: Input: 38 Output: 2 Explanation: the process of adding is: 3 + 8 = 11, 1 + 1 = 2. Since 2 is a single digit, 2 is returned. Advanced: Can you solve this […]

  • Stack and queue


    Stack is different from queue, array, linked list and tree. Stack and queue are mainly used as programmer’s tools. They are mainly used as auxiliary tools to conceive algorithms, rather than complete data storage tools. They have a much shorter life cycle than arrays. They are created during the execution of the program and destroyed […]

  • The eighth issue of leetcode algorithm weekly


    The official account of WeChat’s public front growth story is written in 2020.05.07. background This paper records the whole thinking process in the process of writing questions for reference. The main contents include: Assumption of topic analysis Code validation Refer to others solution Reflection and summary catalog 155. Minimum stack 160. Intersecting linked list 167. […]