Insert nodes in the bidirectional linked list and output

[problem description] For the two-way linked list of the leading node, the insertion algorithm is realized. [input form] Enter an N in the first line (n is greater than or equal to 1 and less than 1000); In the second line, enter n integers separated by spaces to create a two-way linked list with a length of N. for the convenience of two-wa ...

Posted by drfate on Sat, 06 Nov 2021 13:39:05 +0100

C Language: Implementation of Sequential Table

Title C Language Implementation Order Table Definition of Linear Table A linear table is a finite sequence of n data elements with the same characteristics. Linear table is a data structure that is widely used in practice. Common linear tables are order table, chain table, stack, queue, string A linear table is logically a linear structure, ...

Posted by kye on Fri, 05 Nov 2021 17:24:02 +0100

Data structure and sorting algorithm (internal sorting)

1. Terms and marks of sorting Sorting key: it can be any comparable data type (character, string, integer, real number, etc.). For any record, you can find a function to get its key. Stability: do not change the original input order of records with the same key. 2. The three costs are Θ ()Sorting method (insert, bubble, select) I. in ...

Posted by nosheep on Thu, 04 Nov 2021 19:12:06 +0100

[RTOS] queue structure based on RTOS source code

catalogueprefaceIPCMember analysiscRxLock and cTxLockTrigger unblockAttachment - source code preface The following RTOS is based on FreeRTOS source code analysis. It is recommended to look at the source code directly. Li Zhuming's blog: https://www.cnblogs.com/lizhuming/p/15487239.html IPC I think one of the structures that must be understood ...

Posted by Grimloch on Thu, 04 Nov 2021 06:35:38 +0100

Socket kernel data structure

In the previous section, we talked about the calling process of Socket in TCP and UDP scenarios. In this section, we will follow this process to the kernel to find out what data structures have been created and what things have been done in the kernel. Parsing socket function Let's start with the Socket system call. SYSCALL_DEFINE3(socket, i ...

Posted by drorgo on Wed, 03 Nov 2021 22:43:41 +0100

Wonderful use of tree array

As a data structure with a very small constant and easy to write, the binary index tree (BIT) is naturally favored by many players. In addition to the well-known sum between intervals and regions, tree array can also replace the huge constant line segment tree to do many things, such as maintaining high-dimensional difference or bisection on BI ...

Posted by papaface on Wed, 03 Nov 2021 01:18:34 +0100

Detailed explanation of single linked list (the end of the text contains all the codes that have been completely tested ~ they can be taken by themselves if necessary)

catalogue Zero. Preface 1. Linked list and sequence list 1. Defects and advantages of sequence table advantage shortcoming 2. Advantages and disadvantages of linked list advantage shortcoming 2. Logical and physical structure of linked list 1. Logical structure 2. Physical structure 3. Basic operation of single linked list 1. Def ...

Posted by lando on Tue, 02 Nov 2021 07:12:18 +0100

Sequence table of data structure

catalogue What is a linear table? Sequence table Static sequence table Dynamic sequence table text.c Seqlist.h Seqlist.c What is a linear table? A linear list is a finite sequence of n data elements with the same characteristics. Linear table is a data structure widely used in practice. Common linear tables: sequential table, linked ...

Posted by MartiniMan on Mon, 01 Nov 2021 14:43:33 +0100

Queue (sequential queue, cyclic queue, chain queue) super detailed explanation

Basic knowledge of queue Queue (ADT): a linear table that is limited to inserting at one end of the table and deleting at the other end of the table. Among them, the rear is the position where the new elements enter the queue in turn, and the front is the position where the elements in the queue leave the queue in turn. In vernacular, i ...

Posted by GYK on Sun, 31 Oct 2021 19:56:00 +0100

Data structure course design -- Design of traffic consulting system

1, Problem Description: Design of traffic consultation system Design purpose: Master dijestra algorithm and Floyd algorithm, and be able to use them to solve the shortest path problem. Master the depth and breadth traversal algorithm of the graph. Master quick sorting algorithm. Content: Design a traffic consulting system by reading Natio ...

Posted by pranesh on Sun, 31 Oct 2021 02:17:02 +0200