List, Set, data structure, Collections
Learning objectives
Be able to tell the characteristics of the List set Be able to say common data structures Be able to tell the characteristics of array structure Be able to tell the characteristics of stack structure Be able to tell the characteristics of queue structure Be able to tell the structural characteristics of one-way linked list ...
Added by sanchan on Sun, 30 Jan 2022 00:31:20 +0200
Application of hash -- bitmap
bitmap
Bitmap concept
Give 4 billion non repeating unsigned integers, which have not been sorted. Given an unsigned integer, how to quickly judge whether a number is in these 4 billion numbers. [Tencent]
Idea 1: traversal, time complexity
O
(
N
...
Added by phphunger on Sat, 29 Jan 2022 20:58:50 +0200
TAILQ linked list learning notes
TAILQ linked list has been read many times before and after. Record some points in the learning process.
1. Data structure
#define TAILQ_ENTRY(type)
struct\
{\
struct type *tqe_next;\
struct type **tqe_prev;\
}
TAILQ linked list uses a called TAILQ_ The structure of entry, which contains two pointers: 1) Pointer to the next node tqe ...
Added by bkanmani on Sat, 29 Jan 2022 15:35:35 +0200
Notes on the beauty of data structure and algorithm
sort
How to analyze a "sorting algorithm"?
Execution efficiency of sorting algorithm 1.1 time complexity of best case, worst case and average case 1.2 coefficient, constant and low order of time complexity 1.3 comparison times and exchange (or movement) timesMemory consumption of sorting algorithmStability of sorting algorithm
Why ...
Added by secret007 on Sat, 29 Jan 2022 13:53:10 +0200
Data structure Java implementation
1, Binary tree
Binary tree is the same dynamic data structure as linked list. Binary tree has natural recursive structure, that is, the left subtree of each node is also a binary tree, and the right subtree of each node is also a binary tree.
2, Binary search tree
2.1 features
Our binary search tree does not contain duplicate elements. ...
Added by Cochise on Sat, 29 Jan 2022 12:21:50 +0200
The beauty of data structure and algorithm -- review of single linked list
1. Course content
For details, please refer to the course "beauty of data structure and algorithm" on "geek time": 07 | linked list (Part 2): how to write the correct linked list code easily? (geekbang.org)
2. After class practice
code:
node
package dataStruct;
/**
* @ClassName Node
* @Version 1.0
* @Autho ...
Added by kenshejoe on Sat, 29 Jan 2022 11:32:32 +0200
Implementation of addition, deletion, query and modification of single linked list (described in c language)
Before realizing the basic functions of single linked list, first introduce what is single linked list and the basic idea of adding, deleting, checking and modifying.
1, A brief introduction to linked list and single linked list
(1) Linked list
Overview: each element in the linear table has a unique precursor element and successor element.
...
Added by sh0tgun on Sat, 29 Jan 2022 08:07:16 +0200
2020 Jiangsu Collegiate Programming Contest-A.Array
Array
Title Description
Yukikaze received an array (a1,a2,⋯an)as a gift. She decided to play with it. The game consists of q turns. In each turn, she will perform some kind of operation (listed below) on all elements in a subarray of a. In this problem, we define that 00=1. Since the result of operations of the last two kinds may be large ...
Added by phpcat on Fri, 28 Jan 2022 20:55:53 +0200
[remanufacturing] poj-3279 Flipile solution
[remanufacturing] poj-3279 Flipile solution
I'm so weak. I record a violence I can't think of for two days
Title Link: POJ-3279.Fliptile Students who understand the meaning of the question and just want to see the code suggest jumping here directly: Normal code
subjectmeaning of the titleProblem solving ideasCode block parsing
Main functi ...
Added by wellmoon on Fri, 28 Jan 2022 12:13:26 +0200
Java basic syntax -- selective sorting, bubble sorting, and the use of binary search method and Arrays class
This article will take you to understand the principle and code implementation of selective sorting, bubble sorting and binary search method, as well as some operations on Arrays through the Arrays class
1, Select sort
selection sorting is to start from the first number, compare with all numbers in turn, put the maximum (de ...
Added by mator on Fri, 28 Jan 2022 11:41:46 +0200