Summary of "eight sorting" of confused algorithm -- crossing the sorting barrier with 20000 words, 8 dynamic graphs and 450 lines of code (recommended Collection)

🌲 This article is included in the column Confused algorithm ——From today on, we have crossed the barrier of data structure and algorithm Recommended by other high-quality columns: 📚Technical expert cultivation ——Engage in technology, enter big factories and talk about the three in one column of life 📚leetcode 30 ...

Added by chanfuterboy on Mon, 27 Sep 2021 02:32:38 +0300

BFS question: PIPI's safe

BFS question: PIPI's safe Question: Idea:   we need to find the minimum operand from the initial state to the final state, which can be solved by BFS. For each operation, we can rotate any of the 9 knobs, that is, a state can derive 9 sub states.   how to store the status of 9 knobs? We can use a one-dimensional array to represe ...

Added by TheHaloEffect on Sun, 26 Sep 2021 03:38:09 +0300

[C + +] use and Simulation of STL: list

1, list introduction list is a sequential container that can be inserted and deleted at any position within the constant range with an efficiency of O(1), and the container can iterate back and forth. The bottom layer of the list is a two-way linked list structure. Each element in the two-way linked list is stored in independent nodes th ...

Added by luked23 on Sat, 25 Sep 2021 21:45:01 +0300

LeetCode 707. Design linked list

Title Description: Design the implementation of linked list. You can choose to use single linked list or double linked list. A node in a single linked list should have two attributes: val and next. val is the value of the current node, and next is the pointer / reference to the next node. If you want to use a two-way linked list, you also need ...

Added by aim25 on Sat, 25 Sep 2021 14:48:34 +0300

Advanced Data Structure Lessons

Higher order data structure Splay AcWing 2437. Splay AcWing 950.Depressed teller AcWing 1063.Never Township AcWing 955.Maintain columns #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 500010, INF = 1e9; int n, m; struct Node { int s[2], p, v; ...

Added by El_Dudereno on Fri, 24 Sep 2021 22:47:42 +0300

2, Stack and queue (to be supplemented)

Stack and queue -- Restrictive linear table structure These two data structures are linear data structures widely used in programming. Compared with linear tables, the insertion and deletion operations of stacks and queues are more limited. The comparison is as follows: [the external chain picture transfer fails. The source station may have ...

Added by bogeyman on Fri, 24 Sep 2021 15:59:47 +0300

Data structures and algorithms

#Data structure and algorithm Introduction There is no best algorithm in the world, only the most suitable algorithm Logical structure Physical structure Talk about algorithm Algorithm time complexity Just tell you to pay attention to the highest order, then ignore the constant product of constan ...

Added by bradlybrown on Fri, 24 Sep 2021 12:39:26 +0300

HashMap source code analysis (1.8)

HashMap source code analysis (JDK1.8) 1, Implementation interface public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable {} HashMap inherits the AbstractMap class and implements the Map interface public abstract class AbstractMap<K,V> implements Map<K,V> {} The Ab ...

Added by daltman1967 on Thu, 23 Sep 2021 17:20:05 +0300

HashMap learning (based on JDK 1.8)

1. Nagging On the interpretation of HashMap source code, check a lot onlineAlthough they are similar, as a rookie, I'm always afraid that if I don't pay attention to any knowledge point, I'll miss 100 million 😂At the same time, I also need to screen, identify and integrate these knowledgeIf you want to have the confidence to say that this pla ...

Added by takeiteasy on Thu, 23 Sep 2021 17:16:38 +0300

[Java learning] object oriented programming

abstract class What is an abstract class? Common class code example: class Shape {//At this time, the methods in this Shape class have no specific implementation public void draw(){//If a method has no concrete implementation, the method can be an abstract method. } } 1. Abstract method: if a method is modified by abs ...

Added by paulb on Thu, 23 Sep 2021 15:31:23 +0300