Data structure - operation and implementation of single linked list (including all codes)
Article catalogue
catalogue Article catalogue preface 1, Basic operation 2, Code implementation 1. Code This is test Part C is mainly the part of the main function This is linklist Part C is mainly the part of the function body This is test H, mainly the header file 2. Display effect summary
preface
Recently, I learned the li ...
Posted by Karlos94 on Sun, 23 Jan 2022 04:57:50 +0100
Source code analysis and simple encapsulation of hiredis
hiredis
Hiredis is an open source C library function that provides basic redis operation functions, such as database connection, sending commands, releasing resources, etc
1,hiredis net
hiredis itself is a cross platform code. It is built in c language and can be executed on a variety of platforms. Let's see what his net block has done
#in ...
Posted by Griven on Sun, 23 Jan 2022 04:38:29 +0100
Can't write and search sets? Take a look at this article that implements and searches sets in Java
Joint search is to merge the contents that are not originally in a set into a set.It is not very useful in the actual scene.
Except that you need to query in several sets at the same time, avoid querying many times, so as to query together.
The following is a simple implementation example. Let's give an example to illustrate what is a joint ...
Posted by SBukoski on Sun, 23 Jan 2022 02:49:55 +0100
Introduction to C + + STL
Reference link
https://www.bilibili.com/video/BV1et411b73Z?p=185
STL acquaintance
Birth of STL
For a long time, the software industry has been hoping to build something that can be reusedThe object-oriented and generic programming idea of C + + aims to improve the reusabilityIn most cases, data structures and algorithms fail to have a set o ...
Posted by adriaan on Sun, 23 Jan 2022 02:21:47 +0100
python algorithm template part I (quick sort, merge sort, integer bisection, real bisection)
Note: This article is after learning acwing Basic algorithm Course It is mainly used to record the template of python version algorithm.
1. Quick sort
Thought: Divide the list with a number (pivot) in the list. The number on the left is less than pivot and the number on the right is greater than pivot.
Steps: 1. Determine pivot. Left, right, ...
Posted by TheKiller on Sun, 23 Jan 2022 01:58:25 +0100
[blocking] blocking Beginner Level 1 ~ 4
What is blocking
After learning the segment tree and tree array, these two data structures can solve most of the problems, but it is not difficult to find their shortcomings in the process of use
Tree array
O
(
(
N
...
Posted by fewtrem on Sat, 22 Jan 2022 21:59:39 +0100
Leetcode Brush Title Notes - Basic Operation and Classic Title of Chain List
Brush the title from: Code Casual Recording
1. Chain list basic operations
707. Design Chain List
Leetcode Link
Design the implementation of the chain table. You can choose to use single or double-linked lists. A node in a single-chain table should have two attributes: val and next. val is the value of the current node, and next is the ...
Posted by qrt123 on Sat, 22 Jan 2022 21:35:16 +0100
C language data structure - queue
1, Basic concepts of queue
(1) Definition: a linear table that can only be inserted at one end of the table and deleted at the other end of the table. (2) Features: first in first out
The schematic diagram is as follows:
2, Queue of sequential storage structure
Dynamic diagram of sequential queue with 6 storage spaces
2.1 "false ove ...
Posted by mistercoffee on Sat, 22 Jan 2022 21:14:58 +0100
How to Eliminate Recursive Summary with Stack
Reference article: How to replace recursive functions using stack and while-loop to avoid the stack-overflow.
Links: How to replace recursive functions using stack and while-loop to avoid the stack-overflow - CodeProject
The paper is a foreign literature in full English. Describes some methods of eliminating recursion with stack, after readin ...
Posted by luckybob on Sat, 22 Jan 2022 18:10:55 +0100
[C + +] [learning notes] [dynamic programming problem] playing with algorithm interview -- Explanation of Leetcode real questions by categories; 0-1 knapsack problem; Subsequence problem;
General framework
General contents:
[learning notes] playing with algorithm interview -- Explanation of Leetcode real questions by categories
9, Dynamic programming problem
Classical dynamic programming problem: Fibonacci sequence;
Mnemonic search: add mnemonic search on the basis of recursion; Solve problems from top to bottom.
D ...
Posted by wvwisokee on Sat, 22 Jan 2022 16:57:49 +0100