## Digital statistics DP (338. Counting problem)

Digital statistics DP (338. Counting problem) Given two integers ∼ a ∼ and ∼ b, find the number of occurrences of 0 ∼ 9 in all numbers between ∼ a ∼ and ∼ b. For example, if a=1024 and b=1032, the total number of ， 9 ， between ， a ， and ， b ， is as follows: 1024 1025 1026 1027 1028 1029 1030 1031 1032 Among ...

Posted by artisticre on Fri, 20 May 2022 22:49:00 +0300

## "May Training" on the 20th day - binary search tree

foreword This is the 20th day of the May training camp. Today's training content is binary search tree. Problem solving report 1. Force buckle 700 Original title link 700. Searching in Binary Search Trees Topic overview Given a binary search tree (BST) root node root and an integer value val. You need to find the node whose node val ...

Posted by Duncan85 on Fri, 20 May 2022 22:40:36 +0300

## Java data structure and algorithm -- stack

catalogue 1. Basic concept of stack 2. Simple implementation of stack 3. Code analysis 4. Application scenario 5. Summary   In the first chapter, we talked about the specific data storage structure of data, which is mainly used for data recording. This chapter mainly talks about an auxiliary tool for conceiving algorithms - stack, which is u ...

Posted by direwolf on Fri, 20 May 2022 12:49:15 +0300

## LeetCode classification: find two

Find actual combat Case 1: sum of two numbers Given an integer array nums and a target value target, please find the two integers with and as the target value in the array and return their array subscripts. You can assume that each input will correspond to only one answer. However, the same element in the array cannot be used twice. Example: G ...

Posted by onewaylife on Fri, 20 May 2022 12:03:25 +0300

## [tree structure]: the directory structure for querying the complete path through multiple vertices

Demand background: Recently, in the data R & D platform, there is a search related demand: users can do fuzzy search through the Job name, return the relevant result set, and carry out the complete directory structure. The directory structure of the R & D platform is divided into four types: the root node is the workspace, the sub node ...

Posted by TipPro on Fri, 20 May 2022 07:42:29 +0300

## [data structure and algorithm] stack and queue

Stack What is a stack? Stack is a kind of linear table. It only allows the insertion and deletion of elements at the fixed end. The one end for data insertion and deletion is called the top of the stack and the other end is called the bottom of the stack. Therefore, the stack addition and deletion elements have what we often call last ...

Posted by beboo002 on Fri, 20 May 2022 00:43:56 +0300

## CF 1405E Fixed Point Removal

CF 1405E Fixed Point Removal Meaning: Given the sequence \ (A \) with length \ (n \), the number of \ (A_i = i \) (i.e. the value is equal to its subscript) can be deleted in each operation, and then the remaining arrays are spliced together to ask how many can be deleted at most \(q \) independent inquiries. Set the number of the first \ ...

Posted by bakigkgz on Thu, 19 May 2022 08:38:13 +0300

## Data structure day 8 - two dimensional array and matrix multiplication, and transpose of compressed matrix

The first is matrix multiplication #include<stdio.h> #include<stdlib.h> /** *Dynamic two-dimensional array */ typedef struct TwoDArray{ int rows; int columns; int **elements; } TwoDArray, *TwoDArrayPtr; /** *Static two-dimensional array */ typedef struct TwoDStaticArray{ int rows; int columns; int elements; } ...

Posted by g00bster on Thu, 19 May 2022 00:09:30 +0300

## Data Structure Chapter 6 Graph Study Notes

content 1. Figure 6.1 Definition of graph 6.2 Basic terminology of graphs 6.3 Graph storage structure 6.3.1 Lead matrix 6.3.2 Adjacency List 6.4 Traversal of graphs 6.4.1 Depth-First Search (DFS) 6.4.2 Breadth-First Search (BFS) 6.5 Applications of graphs 6.5.1 Minimum Spanning Tree 6.5.2 Shortest path 6.5.3 Topolog ...

Posted by Ramtree on Wed, 18 May 2022 01:04:31 +0300

## P6186 bubble sort (tree array + thinking)

1. The number of exchanges in each round of bubble sorting is equal to N - x, and X is the number of numbers that meet the following conditions: there is no larger number in front of this number We say that this number does not participate in the exchange in the current round of bubble sorting 2. The total number of rounds of bubble sort exc ...

Posted by moboter on Tue, 17 May 2022 23:30:21 +0300