1. List series collection 1. Features 2. Unique methods 2. Traversal of List collection Because the List collection has an index, it can be traversed using a for loop These functions can be used by List implementation classes (LinkList, ArrayList). 3. The underlying principle of the ArrayList collection 1.Principle 2. Applicable scenarios 4. The underlying […]
Tag: list
Classic OJ questions about linked lists (palindromic structure of linked lists, linked lists with rings, deep copies of linked lists)
Table of Contents Preface 1. Reverse a singly linked list. 2. Given a non-empty singly linked list with head node head, return the middle node of the linked list. 3. The palindrome structure of the linked list. 4. The problem of chain strap ring (*****) 4.1 Whether to wear a ring 4.2 Nodes entering the […]
[Data Structure] Single Linked List OJ Questions (2)
Blog homepage: The little sheep has insomnia. Series of columns: “C Language” strong> 《Data Structure》 《Linux》《Cpolar》 Thank you everyone for likingfavorites?comments Article directory 1. Split linked list 2. Palindrome linked list 3. Intersection linked list 4. Circular linked list I 5. Circular Linked List II 6. Deep copy of linked list 1. Split linked list […]
Linked List: Remove Linked List Elements Design Linked List Flip Linked List
Linked list Single list Double linked list circular linked list Storage method in memory: The addresses are not continuous and are connected through pointers in the pointer fields of nodes. Applicable scenarios: The amount of data is not fixed, there are many additions and deletions, and there are few queries. Definition of linked list //Singly […]
[Data structure] Simple implementation of singly linked list
Tip: After the article is written, the table of contents can be automatically generated. For how to generate it, please refer to the help document on the right. Article directory Preface 1. Definition of singly linked list 2. The composition of data elements in the linked list 3. Basic operations of linked lists 4. Functional […]
Data structure (C language) experiment-singly linked list
Singly linked list without head node Inverted linked list Assume that the linear table (a1, a2, a3,…an) is stored in a singly linked list without a head node, Please design the algorithm function linklist reverse1(linklist head) and void reverse2(linklist *head) inverts the head of a singly linked list without a head node in place, Make […]
Data structure linear list – headed two-way circular linked list
Preface: It’s been a long time, friends. In the last article, we studied the singly linked list, one of the data structures, linear tables, and learned many benefits of the singly linked list. However, it is impossible to have a perfect data structure, even if it is a singly linked list. There will be many […]
c language-data structure-led two-way circular linked list
Table of Contents 1. The structure of a two-way circular linked list 2. Creation of the structure of a two-way circular linked list 3. Initialization of two-way circular linked list 3.1 Printing of doubly linked list 4. Head plug of two-way circular linked list 5. Tail insertion of two-way circular linked list 6. Deletion of […]
A brief explanation of the use of List [C++]
A brief explanation of the use of List [C++] 1. List 1.1. Difference from vector 1.2 Different from the use of vector 1.2.1 Iterator invalidation 1.2.2. insert 1.2.3 erase 1.2.4 sort 1.3. Other interfaces Supplementary iterator The relationship between containers and iterators Iterator type 一. List After learning STL, I have also reached the content […]
C++stl_list linked list
Linked lists have been learned as early as when we were learning data structures. When I was learning data structures, I implemented them in C language just like my last vector article. The code I wrote at that time was smelly and long, and I had to satisfy a lot of requirements. interface; future/my_road – […]