Tag：Single chain

Day 58/100 data structure linked list (1) – single linked list
（1） Requirements Recently, I began to learn algorithms. Linked list is a classic data structure among data structures. The single linked list is the foundation of the foundation. （2） Single linked list 1. Definition Each node in the single linked list contains not only values, but also links to the next nodeReference field。 In this […]

Linear table
1. Definitions and details to pay attention to when definingLinear table: (1) limited number (2) all data elements and the same type (3) it is a logical structure (sequential table and linked list are the storage structure) During operation definition, &l and l: with & means that l will be changed during operation, that is, […]

Day 71/100 data structure linked list (11) — realize double linked list
（1） 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 […]

Day 72/100 data structure linked list (12) – linked list summary
（1） Requirements Nearly half a month, I have been learning the related algorithm knowledge of linked lists and doing problems.Let’s make a summary today~ （2） Summary of single linked list and double linked list 1. Common ground Neither of them has random access to data in constant time. Both of them can add a new […]

C++ STL forward_ List container
1、 Foreword forward_ List is a new type of container added to c++ 11. Its underlying implementation is the same as the list container. It also adopts the linked list structure, but forward_ List uses a single linked list, while list uses a twoway linked list. A single linked list can only be traversed from […]

Linklist classic topic – judge whether two linked lists intersect and return the intersection starting point (with mathematical derivation)
Content of this article Solution to the problem of intersecting linked list and derivation of mathematical principle Executable code Title ContentHere are the head nodes heada and headb of the two single linked lists. Please find and return the starting node where the two single linked lists intersect. If two linked lists have no intersection, […]

Why do you want to learn data structure and algorithm? Code up!
The status of data structure and algorithm is selfevident for a programmer.However, few programmers can learn and use well. In addition to the weak foundation, another reason is that there are not many tutorials for Java programmers to learn. Today, the data structure and algorithm tutorial that Java programmers dream of is finally going to […]

Data structure – linked list
Linked list structure There are many kinds of linked list structures. Today I will focus on three most common linked list structures: single linked list, twoway linked list and circular linked list. Let’s first look at the simplest and most commonly used single linked list. Single linked list We habitually call the first node the […]

Complete set of linked list operations of data structure and algorithm series (I) (go)
preface The concept of linked list is not introduced here. You can find relevant books or articles. This paper mainly uses go to realize some linked list operations Note: at the beginning of learning go, the implementation method that may be used is not the simplest. When the meaning is expressed, we can make do […]

Handwritten a mini version of HashMap, interview casually ask!
Author: Zhang fengzhe Source: Jianshu com/p/b638f19aeb64 HashMap is a collection commonly used in Java, and some ideas of HashMap are helpful in solving some business problems. Based on this, this blog will analyze the underlying design ideas of HashMap and write a mini version of HashMap! Thoughts on HashMap First, as shown in the figure, […]

Front end data structure – linear structure – linked list
Linked list The standard array is a continuous memory address, so it will move a lot of data during insertion and deletion. If the amount of data is large, the efficiency will be relatively low. If we record the address of the next element for each element, do we only need to change the address […]

Java data structure and algorithm analysis linked list (single linked list, double linked list, ring linked list)
GitHub source code sharing Project home page:https://github.com/gozhuyinglong/blogdemosSource code of this article:https://github.com/gozhuyinglong/blogdemos/tree/main/javadatastructures 1. Preface Through the previous article《array》It is understood that the storage structure of the array is a continuous memory. When inserting and deleting elements, each part of the array may move as a whole. In order to avoid such linear overhead, we need to […]