The longest absolute path to the file
subject
Assume that the file system is as shown in the figure below:
Here, dir is the only directory in the root directory. Dir contains two subdirectories, subdir1 and subdir2. Subdir1 contains the file file1.ext and subdirectory subdir1; Subdir2 contains the subdirectory subdir2, which contains the file file2.ext.
In the text format, as f ...
Posted by br0ken on Sun, 19 Sep 2021 17:43:35 -0700
Variable array and linked list
Variable array and linked list
1, Variable array
1. Realization
define a data structure array, which contains an integer pointer array and a size used to indicate the length of the current array.
a. Header file
def.h
#ifndef _ARRAY_H_
#define _ARRAY_H_
#define BLOCK_SIZE 10
typedef struct{
int *array;
int size ...
Posted by SystemWisdom on Sun, 19 Sep 2021 17:38:15 -0700
2021-9-19 707. Design linked list (single linked list + double linked list)
Note:
Title: 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 an at ...
Posted by yrrahxob on Sun, 19 Sep 2021 16:02:36 -0700
[data structure and algorithm] Chapter 5: linear table (sequence table, linked list, stack, queue, symbol table)
5. Linear table
Linear table is the most basic, simplest and most commonly used data structure. A linear table is a finite sequence of n data elements with the same characteristics
Precursor element: if element A is in front of element B, A is called the precursor element of B
Successor element: if element B is after element a, it is calle ...
Posted by emediastudios on Sun, 19 Sep 2021 14:01:16 -0700
Fundamentals of binary search algorithm
In binary search, the definition of the search interval of the target element is very important, and the definitions of different intervals are written differently. Because the search interval is iterative, it is very important to determine the search range, mainly the opening and closing of the left and right intervals. The opening and closing ...
Posted by audiodef on Sun, 19 Sep 2021 11:05:30 -0700
C language structure and the use of structure pointer
C language structure and the use of structure pointer
tips: Recently, we need to learn about data structures, so what is essential is the structure and structure pointer of c language, so we'll sort out these basic knowledge
c language structure (struct) is a data set composed of a series of data with the same type or different types. ...
Posted by Tjeuten on Sat, 18 Sep 2021 22:00:04 -0700
Linear table (data structure)
Linear table
1. Linearity table Definition: a finite sequence of n (> = 0) data elements, marked as L = (a1, a2,..., an). (ai is the data element, n is the table length, a1 is the first element, and an is the tail element) characteristic: 1. Except the first element, each other element has and only has a direct forward trend. 2. Except the ...
Posted by dfownz on Sat, 18 Sep 2021 14:37:48 -0700
Some structures of FFmpeg
1. AVCodec structure 2. AVCodecContext structure 3. AVInputFormat structure 4. AVFormatContext structure 5. MovContext structure 6. URLProtocol structure 7. URLContext structure 8. AVIOContext structure (old version: ByteIOContext) 9. AVStream structure 10. Movstramcontext structure 11. AVPacket structure 12. AVPacketList structure 13. AVFrame ...
Posted by TomT64 on Sat, 18 Sep 2021 09:22:28 -0700
Learning notes of data structure, algorithm and application - C + + language description - priority queue - Zuo gaoshu
1, Zuo gaoshu
The heap structure learned earlier is an implicit data structure. The heap represented by a complete binary tree is stored implicitly in an array (i.e. no explicit pointer or other data can be used to reshape this structure). Because there is no storage structure information, this representation method has high space utilizat ...
Posted by Kower on Sat, 18 Sep 2021 09:08:34 -0700
The single linked list (c) will be supplemented when the strength is enough
catalogue
1: Node creation
2: Traversal of linked list
3: Find the number of elements in the single linked list
4: Insertion and deletion of single linked list and release of all nodes
insert
delete
Release all nodes
5: Implementation of single linked list (each time a new node is created, the next field of the node must b ...
Posted by ochi on Sat, 18 Sep 2021 05:35:57 -0700